public TAccessControlServiceDemo()
 {
     try
     {
         accessControlServiceDemo = new AccessControlServiceDemo(DefaultRepository, SecondaryRepository, UserLoginName, Password);
         sampleContentManager = new SampleContentManager(accessControlServiceDemo);
         userName = sampleContentManager.GetUserNameFromRepository();
     }
     catch (FaultException<SerializableException> ex)
     {
         Console.WriteLine(String.Format("Got FaultException[{0}] with message: {1}\n", ex.Detail, ex.Message));
     }
     catch (Exception exx)
     {
         Console.WriteLine(exx.StackTrace);
     }
 }
 public TAccessControlServiceDemo()
 {
     try
     {
         accessControlServiceDemo = new AccessControlServiceDemo(DefaultRepository, SecondaryRepository, UserLoginName, Password);
         sampleContentManager     = new SampleContentManager(accessControlServiceDemo);
         userName = sampleContentManager.GetUserNameFromRepository();
     }
     catch (FaultException <SerializableException> ex)
     {
         Console.WriteLine(String.Format("Got FaultException[{0}] with message: {1}\n", ex.Detail, ex.Message));
     }
     catch (Exception exx)
     {
         Console.WriteLine(exx.StackTrace);
     }
 }
Esempio n. 3
0
        private void attachTestLifecycle()
        {
            ObjectIdentity objId = new ObjectIdentity();

            objId.RepositoryName = DefaultRepository;
            objId.Value          = new Qualification(SampleContentManager.gifImageQualString);

            ObjectIdentity policyId = new ObjectIdentity();

            policyId.RepositoryName = DefaultRepository;
            String lifecycleQualString = "dm_policy where object_name='BusinessPolicy1' and owner_name='"
                                         + sampleContentManager.GetUserNameFromRepository() + "'";

            policyId.Value = new Qualification(lifecycleQualString);

            lifecycleServiceDemo.AttachLifecycle(objId, policyId, null);
            Console.WriteLine("Completed attach of lifecycle.");
            Console.WriteLine("Lifecycle: " + lifecycleQualString);
            Console.WriteLine("Attached to document: "
                              + SampleContentManager.gifImageQualString);
        }