Class ContentManagementServices


  • public class ContentManagementServices
    extends java.lang.Object
    ContentManagementServices Class
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addRoleToUser​(Delegator delegator, LocalDispatcher dispatcher, java.util.Map<java.lang.String,​java.lang.Object> serviceContext)  
      static java.util.Map<java.lang.String,​java.lang.Object> changeLeafToNode​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> clearContentAssocDataResourceViewCache​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> clearContentAssocViewCache​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> decrementContentChildStats​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> findSubNodes​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> followNodeChildren​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> followNodeChildrenMethod​(GenericValue content, LocalDispatcher dispatcher, java.lang.String serviceName, java.util.Map<java.lang.String,​java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> getContent​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      getContent This service calls a same-named method in ContentWorker to do the work.
      static java.util.Map<java.lang.String,​java.lang.Object> getSubContent​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      getSubContent Finds the related subContent given the template Content and the mapKey.
      static java.util.Map<java.lang.String,​java.lang.Object> incrementContentChildStats​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> initContentChildCounts​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> persistContentAndAssoc​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> rcontext)
      persistContentAndAssoc A combination method that will create or update all or one of the following: a Content entity, a ContentAssoc related to the Content, and the ElectronicText that may be associated with the Content.
      static java.util.Map<java.lang.String,​java.lang.Object> persistDataResourceAndData​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> persistDataResourceAndDataMethod​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> rcontext)  
      static java.util.Map<java.lang.String,​java.lang.Object> resequence​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Reorder sequence numbers in ContentAssoc entities for a given parent id if variable dir contains the string up or down, realize for the given contentIdTo switch with the previous or the next
      static java.util.Map<java.lang.String,​java.lang.Object> resetToOutlineMode​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> rcontext)  
      static java.util.Map<java.lang.String,​java.lang.Object> updateContentChildStats​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> updateContentSubscription​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> updateContentSubscriptionByOrder​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> rcontext)  
      static java.util.Map<java.lang.String,​java.lang.Object> updateContentSubscriptionByProduct​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> rcontext)  
      static java.util.Map<java.lang.String,​java.lang.Object> updateLeafCount​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> updateOrRemove​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static void updateOutlineNodeChildren​(GenericValue content, boolean forceOutline, java.util.Map<java.lang.String,​java.lang.Object> context)  
      static void updatePageNodeChildren​(GenericValue content, java.util.Map<java.lang.String,​java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> updatePageType​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> rcontext)
      This service changes the contentTypeId of the current content and its children depending on the pageMode.
      static java.util.Map<java.lang.String,​java.lang.Object> updateSiteRoles​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Service for update publish sites with a ContentRole that will tie them to the passed in party.
      static java.util.Map<java.lang.String,​java.lang.Object> updateSiteRolesDyn​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.lang.String updateTypeAndFile​(GenericValue dataResource, java.util.Map<java.lang.String,​java.lang.Object> context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContentManagementServices

        public ContentManagementServices()
    • Method Detail

      • getSubContent

        public static java.util.Map<java.lang.String,​java.lang.Object> getSubContent​(DispatchContext dctx,
                                                                                           java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        getSubContent Finds the related subContent given the template Content and the mapKey. This service calls a same-named method in ContentWorker to do the work.
      • getContent

        public static java.util.Map<java.lang.String,​java.lang.Object> getContent​(DispatchContext dctx,
                                                                                        java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        getContent This service calls a same-named method in ContentWorker to do the work.
      • persistContentAndAssoc

        public static java.util.Map<java.lang.String,​java.lang.Object> persistContentAndAssoc​(DispatchContext dctx,
                                                                                                    java.util.Map<java.lang.String,​? extends java.lang.Object> rcontext)
                                                                                             throws GenericServiceException
        persistContentAndAssoc A combination method that will create or update all or one of the following: a Content entity, a ContentAssoc related to the Content, and the ElectronicText that may be associated with the Content. The keys for determining if each entity is created is the presence of the contentTypeId, contentAssocTypeId and dataResourceTypeId. This service tries to handle DataResource fields with and without "dr" prefixes. Assumes binary data is always in field, "imageData".

        This service does not accept straight ContentAssoc parameters. They must be prefaced with "ca" + cap first letter

        Throws:
        GenericServiceException
      • updateSiteRoles

        public static java.util.Map<java.lang.String,​java.lang.Object> updateSiteRoles​(DispatchContext dctx,
                                                                                             java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Service for update publish sites with a ContentRole that will tie them to the passed in party.
      • persistDataResourceAndData

        public static java.util.Map<java.lang.String,​java.lang.Object> persistDataResourceAndData​(DispatchContext dctx,
                                                                                                        java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • updateSiteRolesDyn

        public static java.util.Map<java.lang.String,​java.lang.Object> updateSiteRolesDyn​(DispatchContext dctx,
                                                                                                java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • updateOrRemove

        public static java.util.Map<java.lang.String,​java.lang.Object> updateOrRemove​(DispatchContext dctx,
                                                                                            java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • resequence

        public static java.util.Map<java.lang.String,​java.lang.Object> resequence​(DispatchContext dctx,
                                                                                        java.util.Map<java.lang.String,​? extends java.lang.Object> context)
                                                                                 throws GenericServiceException
        Reorder sequence numbers in ContentAssoc entities for a given parent id if variable dir contains the string up or down, realize for the given contentIdTo switch with the previous or the next
        Parameters:
        dctx -
        context -
        Returns:
        Throws:
        GenericServiceException
      • updatePageType

        public static java.util.Map<java.lang.String,​java.lang.Object> updatePageType​(DispatchContext dctx,
                                                                                            java.util.Map<java.lang.String,​? extends java.lang.Object> rcontext)
                                                                                     throws GenericServiceException
        This service changes the contentTypeId of the current content and its children depending on the pageMode. if pageMode == "outline" then if the contentTypeId of children is not "OUTLINE_NODE" or "PAGE_NODE" (it could be DOCUMENT or SUBPAGE_NODE) then it will get changed to PAGE_NODE.` if pageMode == "page" then if the contentTypeId of children is not "PAGE_NODE" or "SUBPAGE_NODE" (it could be DOCUMENT or OUTLINE_NODE) then it will get changed to SUBPAGE_NODE.`
        Throws:
        GenericServiceException
      • clearContentAssocDataResourceViewCache

        public static java.util.Map<java.lang.String,​java.lang.Object> clearContentAssocDataResourceViewCache​(DispatchContext dctx,
                                                                                                                    java.util.Map<java.lang.String,​? extends java.lang.Object> context)
                                                                                                             throws GenericServiceException
        Throws:
        GenericServiceException
      • updateTypeAndFile

        public static java.lang.String updateTypeAndFile​(GenericValue dataResource,
                                                         java.util.Map<java.lang.String,​java.lang.Object> context)