Package org.apache.ofbiz.content
Class ContentManagementWorker
java.lang.Object
org.apache.ofbiz.content.ContentManagementWorker
ContentManagementWorker Class
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
buildPKSig
(GenericEntity pk, String suffix) Builds a string signature from a GenericValue or GenericPK.static List<GenericValue>
getAllDepartmentContent
(Delegator delegator, String parentPubPt) Returns a list of "department" (having ContentAssoc of type "DEPARTMENT") Content entities that are children of parentPubPtstatic void
getAllPublishPointMap
(Delegator delegator, String pubPtId, Map<String, GenericValue> publishPointMap) static List<GenericValue>
getAllPublishPoints
(Delegator delegator, String parentPubPt) Returns a list of WebSitePublishPoint entities that are children of parentPubPt The name should be "getAllTopLevelPublishPoints" or "getAllChildPublishPoints"static GenericValue
getAuthorContent
(Delegator delegator, String contentId) static void
getCurrentValue
(HttpServletRequest request, Delegator delegator) static void
getCurrentValueWithCachedPK
(HttpServletRequest request, Delegator delegator, GenericPK cachedPK, String entityName) static String
getFromSomewhere
(String name, Map<String, Object> paramMap, HttpServletRequest request, Map<String, Object> context) static String
getParentWebSitePublishPointId
(Delegator delegator, String contentId) static GenericValue
getParentWebSitePublishPointValue
(Delegator delegator, String contentId) getPermittedDepartmentPoints
(Delegator delegator, List<GenericValue> allDepartmentPoints, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) getPermittedPublishPoints
(Delegator delegator, List<GenericValue> allPublishPoints, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) getPublishedLinks
(Delegator delegator, String targContentId, String rootPubId, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) static Map<String,
GenericValue> getPublishPointMap
(Delegator delegator, String pubPtId) static Map<String,
GenericValue> getPublishPointMap
(Delegator delegator, List<GenericValue> publishPointList) static GenericValue
getStaticValue
(Delegator delegator, String parentPlaceholderId, String webSitePublishPointId, boolean ignoreCache) getStaticValues
(Delegator delegator, String parentPlaceholderId, List<String[]> permittedPublishPointList) static String
getUserName
(HttpServletRequest request, String userLoginId) static GenericValue
getWebSitePublishPoint
(Delegator delegator, String contentId) static GenericValue
getWebSitePublishPoint
(Delegator delegator, String contentId, boolean ignoreCache) static void
mruAdd
(HttpServletRequest request, GenericEntity pk) static void
mruAdd
(HttpServletRequest request, GenericEntity pk, String suffix) static void
mruAdd
(HttpSession session, GenericEntity pk) static void
mruAddByEntityName
(String entityName, GenericEntity pk, Map<String, LifoSet<Object>> lookupCaches) Makes an entry in the "most recently used" cache.static GenericValue
overrideWebSitePublishPoint
(Delegator delegator, GenericValue passedValue) static void
setCurrentEntityMap
(HttpServletRequest request, String entityName, GenericEntity ent) static void
setCurrentEntityMap
(HttpServletRequest request, GenericEntity ent) static void
updateStatsBottomUp
(Delegator delegator, String contentId, List<String> typeList, int branchChangeAmount, int leafChangeAmount) static int
updateStatsTopDown
(Delegator delegator, String contentId, List<String> typeList)
-
Method Details
-
mruAdd
-
mruAdd
-
mruAdd
-
mruAddByEntityName
public static void mruAddByEntityName(String entityName, GenericEntity pk, Map<String, LifoSet<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
-
buildPKSig
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).
-
setCurrentEntityMap
-
setCurrentEntityMap
public static void setCurrentEntityMap(HttpServletRequest request, String entityName, GenericEntity ent) -
getFromSomewhere
-
getCurrentValue
-
getCurrentValueWithCachedPK
public static void getCurrentValueWithCachedPK(HttpServletRequest request, Delegator delegator, GenericPK cachedPK, String entityName) -
getPermittedPublishPoints
public static List<String[]> getPermittedPublishPoints(Delegator delegator, List<GenericValue> allPublishPoints, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) throws GeneralException - Throws:
GeneralException
-
getAllPublishPoints
public static List<GenericValue> getAllPublishPoints(Delegator delegator, 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 Map<String,GenericValue> getPublishPointMap(Delegator delegator, String pubPtId) throws GeneralException - Throws:
GeneralException
-
getAllPublishPointMap
public static void getAllPublishPointMap(Delegator delegator, String pubPtId, Map<String, GenericValue> publishPointMap) throws GeneralException- Throws:
GeneralException
-
getPublishPointMap
public static Map<String,GenericValue> getPublishPointMap(Delegator delegator, List<GenericValue> publishPointList) -
getStaticValues
public static List<Map<String,Object>> getStaticValues(Delegator delegator, String parentPlaceholderId, List<String[]> permittedPublishPointList) throws GeneralException - Throws:
GeneralException
-
getWebSitePublishPoint
public static GenericValue getWebSitePublishPoint(Delegator delegator, String contentId) throws GenericEntityException - Throws:
GenericEntityException
-
getWebSitePublishPoint
public static GenericValue getWebSitePublishPoint(Delegator delegator, String contentId, boolean ignoreCache) throws GenericEntityException - Throws:
GenericEntityException
-
overrideWebSitePublishPoint
public static GenericValue overrideWebSitePublishPoint(Delegator delegator, GenericValue passedValue) throws GenericEntityException - Throws:
GenericEntityException
-
getParentWebSitePublishPointValue
public static GenericValue getParentWebSitePublishPointValue(Delegator delegator, String contentId) throws GenericEntityException - Throws:
GenericEntityException
-
getParentWebSitePublishPointId
public static String getParentWebSitePublishPointId(Delegator delegator, String contentId) throws GenericEntityException - Throws:
GenericEntityException
-
getStaticValue
public static GenericValue getStaticValue(Delegator delegator, String parentPlaceholderId, String webSitePublishPointId, boolean ignoreCache) throws GenericEntityException - Throws:
GenericEntityException
-
getPublishedLinks
public static List<Object[]> getPublishedLinks(Delegator delegator, String targContentId, String rootPubId, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) throws GeneralException - Throws:
GeneralException
-
getAuthorContent
-
getPermittedDepartmentPoints
public static List<String[]> getPermittedDepartmentPoints(Delegator delegator, List<GenericValue> allDepartmentPoints, GenericValue userLogin, Security security, String permittedAction, String permittedOperations, String passedRoles) throws GeneralException - Throws:
GeneralException
-
getAllDepartmentContent
public static List<GenericValue> getAllDepartmentContent(Delegator delegator, 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
-
getUserName
public static String getUserName(HttpServletRequest request, String userLoginId) throws GenericEntityException - Throws:
GenericEntityException
-
updateStatsTopDown
public static int updateStatsTopDown(Delegator delegator, String contentId, List<String> typeList) throws GenericEntityException - Throws:
GenericEntityException
-
updateStatsBottomUp
public static void updateStatsBottomUp(Delegator delegator, String contentId, List<String> typeList, int branchChangeAmount, int leafChangeAmount) throws GenericEntityException - Throws:
GenericEntityException
-