Пример #1
0
        public static PSRelationship CreateRelationship(systemSOAP systemSvc,
                                                        long parentItemID, long childItemID, string relationshipType)
        {
            PSRelationship relationship = null;

            try
            {
                CreateRelationshipRequest req = new CreateRelationshipRequest();
                req.Name        = relationshipType;
                req.OwnerId     = parentItemID;
                req.DependentId = childItemID;

                CreateRelationshipResponse result = systemSvc.CreateRelationship(req);

                if (result != null)
                {
                    relationship = result.PSRelationship;
                }
            }
            catch (SoapException ex)
            {
                throw new CMSSoapException("Percussion error in CreateRelationship().", ex);
            }

            return(relationship);
        }
Пример #2
0
        /// <summary>
        /// The public constructor.
        /// </summary>
        /// <param name="contentService">Reference to the Percussion content Service.</param>
        internal FolderManager(contentSOAP contentService, systemSOAP systemService)
        {
            _contentService = contentService;
            _systemService  = systemService;

            PercussionConfig percussionConfig = (PercussionConfig)System.Configuration.ConfigurationManager.GetSection("PercussionConfig");

            NavonPublicTransitionName = percussionConfig.NavonPublicTransition.Value;
        }
Пример #3
0
        /// <summary>
        /// Creates and intialize a proxy of the Percussion service used for manipulating
        /// the overall system (folders, list of relationships, etc).
        /// </summary>
        /// <param name="protocol">Communications protocol to use when connecting to
        ///     the Percussion server.  Should be either HTTP or HTTPS.</param>
        /// <param name="host">Host name or IP address of the Percussion server.</param>
        /// <param name="port">Port number to use when connecting to the Percussion server.</param>
        /// <param name="cookie">The cookie container for maintaining the session for all
        ///     webservice requests.</param>
        /// <param name="authHeader">The authentication header for maintaining the Rhythmyx session
        ///     for all webservice requests.</param>
        /// <returns>An initialized proxy for the Percussion system service.</returns>
        public static systemSOAP GetSystemService(string protocol, string host, string port, CookieContainer cookie, PSAuthenticationHeader authHeader)
        {
            systemSOAP systemSvc = new systemSOAP();

            systemSvc.Url                         = RewriteServiceUrl(systemSvc.Url, protocol, host, port);
            systemSvc.CookieContainer             = cookie;
            systemSvc.PSAuthenticationHeaderValue = authHeader;

            return(systemSvc);
        }
Пример #4
0
        /// <summary>
        /// Retrieve the list of workflow transitions allowed for a list of content items.
        /// </summary>
        /// <param name="systemSvc">The system service.</param>
        /// <param name="itemList">A list of content items.</param>
        /// <returns>A list of the names for transitions which are allowed for
        /// all content items specified in itemList.</returns>
        /// <remarks>Only returns the tranitions which are common to all
        /// items in the list</remarks>
        public static string[] GetTransitions(systemSOAP systemSvc, long[] itemList)
        {
            GetAllowedTransitionsResponse response;

            try
            {
                response = systemSvc.GetAllowedTransitions(itemList);
            }
            catch (SoapException ex)
            {
                throw new CMSSoapException("Percussion Error in GetTransitions.", ex);
            }

            return(response.Transition);
        }
Пример #5
0
        /// <summary>
        /// Transitions the content items to cdrlive,cdrstaging,...
        /// </summary>
        /// <param name="systemSvc">The proxy of the content service.</param>
        /// <param name="idList">List of ids for the transition</param>
        /// <param name="trigger">The trigger.</param>
        public static void TransitionItems(systemSOAP systemSvc, long[] idList,
                                           string trigger)
        {
            TransitionItemsRequest req = new TransitionItemsRequest();

            try
            {
                req.Id         = idList;
                req.Transition = trigger;
                systemSvc.TransitionItems(req);
            }
            catch (SoapException ex)
            {
                throw new CMSSoapException("Percussion Error in TransitionItems.", ex);
            }
        }