Class ContentManagementWorker


  • public final class ContentManagementWorker
    extends java.lang.Object
    ContentManagementWorker Class
    • Method Detail

      • mruAddByEntityName

        public static void mruAddByEntityName​(java.lang.String entityName,
                                              GenericEntity pk,
                                              java.util.Map<java.lang.String,​LifoSet<java.lang.Object>> lookupCaches)
        Makes an entry in the "most recently used" cache. It picks the cache by the entity name and builds a signature from the primary key values.
        Parameters:
        entityName -
        lookupCaches -
        pk - either a GenericValue or GenericPK - populated
      • mostRecentlyViewedIterator

        public static java.util.Iterator<java.lang.Object> mostRecentlyViewedIterator​(java.lang.String entityName,
                                                                                      java.util.Map<java.lang.String,​LifoSet<java.lang.Object>> lookupCaches)
      • buildPKSig

        public static java.lang.String buildPKSig​(GenericEntity pk,
                                                  java.lang.String suffix)
        Builds a string signature from a GenericValue or GenericPK.
        Parameters:
        pk - either a populated GenericValue or GenericPK.
        suffix - a string that can be used to distinguish the signature (probably not used).
      • getFromSomewhere

        public static java.lang.String getFromSomewhere​(java.lang.String name,
                                                        java.util.Map<java.lang.String,​java.lang.Object> paramMap,
                                                        HttpServletRequest request,
                                                        java.util.Map<java.lang.String,​java.lang.Object> context)
      • getCurrentValueWithCachedPK

        public static void getCurrentValueWithCachedPK​(HttpServletRequest request,
                                                       Delegator delegator,
                                                       GenericPK cachedPK,
                                                       java.lang.String entityName)
      • getPermittedPublishPoints

        public static java.util.List<java.lang.String[]> getPermittedPublishPoints​(Delegator delegator,
                                                                                   java.util.List<GenericValue> allPublishPoints,
                                                                                   GenericValue userLogin,
                                                                                   Security security,
                                                                                   java.lang.String permittedAction,
                                                                                   java.lang.String permittedOperations,
                                                                                   java.lang.String passedRoles)
                                                                            throws GeneralException
        Throws:
        GeneralException
      • getAllPublishPoints

        public static java.util.List<GenericValue> getAllPublishPoints​(Delegator delegator,
                                                                       java.lang.String parentPubPt)
                                                                throws GeneralException
        Returns a list of WebSitePublishPoint entities that are children of parentPubPt The name should be "getAllTopLevelPublishPoints" or "getAllChildPublishPoints"
        Parameters:
        parentPubPt - The parent publish point.
        Throws:
        GeneralException
      • getPublishPointMap

        public static java.util.Map<java.lang.String,​GenericValue> getPublishPointMap​(Delegator delegator,
                                                                                            java.util.List<GenericValue> publishPointList)
      • getStaticValues

        public static java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getStaticValues​(Delegator delegator,
                                                                                                             java.lang.String parentPlaceholderId,
                                                                                                             java.util.List<java.lang.String[]> permittedPublishPointList)
                                                                                                      throws GeneralException
        Throws:
        GeneralException
      • getPublishedLinks

        public static java.util.List<java.lang.Object[]> getPublishedLinks​(Delegator delegator,
                                                                           java.lang.String targContentId,
                                                                           java.lang.String rootPubId,
                                                                           GenericValue userLogin,
                                                                           Security security,
                                                                           java.lang.String permittedAction,
                                                                           java.lang.String permittedOperations,
                                                                           java.lang.String passedRoles)
                                                                    throws GeneralException
        Throws:
        GeneralException
      • getAuthorContent

        public static GenericValue getAuthorContent​(Delegator delegator,
                                                    java.lang.String contentId)
      • getPermittedDepartmentPoints

        public static java.util.List<java.lang.String[]> getPermittedDepartmentPoints​(Delegator delegator,
                                                                                      java.util.List<GenericValue> allDepartmentPoints,
                                                                                      GenericValue userLogin,
                                                                                      Security security,
                                                                                      java.lang.String permittedAction,
                                                                                      java.lang.String permittedOperations,
                                                                                      java.lang.String passedRoles)
                                                                               throws GeneralException
        Throws:
        GeneralException
      • getAllDepartmentContent

        public static java.util.List<GenericValue> getAllDepartmentContent​(Delegator delegator,
                                                                           java.lang.String parentPubPt)
                                                                    throws GeneralException
        Returns a list of "department" (having ContentAssoc of type "DEPARTMENT") Content entities that are children of parentPubPt
        Parameters:
        parentPubPt - The parent publish point.
        Throws:
        GeneralException
      • updateStatsBottomUp

        public static void updateStatsBottomUp​(Delegator delegator,
                                               java.lang.String contentId,
                                               java.util.List<java.lang.String> typeList,
                                               int branchChangeAmount,
                                               int leafChangeAmount)
                                        throws GenericEntityException
        Throws:
        GenericEntityException