Package org.apache.ofbiz.content
Class ContentManagementWorker
- java.lang.Object
-
- org.apache.ofbiz.content.ContentManagementWorker
-
public final class ContentManagementWorker extends java.lang.Object
ContentManagementWorker Class
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
buildPKSig(GenericEntity pk, java.lang.String suffix)
Builds a string signature from a GenericValue or GenericPK.static java.util.List<GenericValue>
getAllDepartmentContent(Delegator delegator, java.lang.String parentPubPt)
Returns a list of "department" (having ContentAssoc of type "DEPARTMENT") Content entities that are children of parentPubPtstatic void
getAllPublishPointMap(Delegator delegator, java.lang.String pubPtId, java.util.Map<java.lang.String,GenericValue> publishPointMap)
static java.util.List<GenericValue>
getAllPublishPoints(Delegator delegator, java.lang.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, java.lang.String contentId)
static void
getCurrentValue(HttpServletRequest request, Delegator delegator)
static void
getCurrentValueWithCachedPK(HttpServletRequest request, Delegator delegator, GenericPK cachedPK, java.lang.String entityName)
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)
static java.lang.String
getParentWebSitePublishPointId(Delegator delegator, java.lang.String contentId)
static GenericValue
getParentWebSitePublishPointValue(Delegator delegator, java.lang.String contentId)
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)
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)
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)
static java.util.Map<java.lang.String,GenericValue>
getPublishPointMap(Delegator delegator, java.lang.String pubPtId)
static java.util.Map<java.lang.String,GenericValue>
getPublishPointMap(Delegator delegator, java.util.List<GenericValue> publishPointList)
static GenericValue
getStaticValue(Delegator delegator, java.lang.String parentPlaceholderId, java.lang.String webSitePublishPointId, boolean ignoreCache)
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)
static java.lang.String
getUserName(HttpServletRequest request, java.lang.String userLoginId)
static GenericValue
getWebSitePublishPoint(Delegator delegator, java.lang.String contentId)
static GenericValue
getWebSitePublishPoint(Delegator delegator, java.lang.String contentId, boolean ignoreCache)
static java.util.Iterator<java.lang.Object>
mostRecentlyViewedIterator(java.lang.String entityName, java.util.Map<java.lang.String,LifoSet<java.lang.Object>> lookupCaches)
static void
mruAdd(HttpServletRequest request, GenericEntity pk)
static void
mruAdd(HttpServletRequest request, GenericEntity pk, java.lang.String suffix)
static void
mruAdd(HttpSession session, GenericEntity pk)
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.static GenericValue
overrideWebSitePublishPoint(Delegator delegator, GenericValue passedValue)
static void
setCurrentEntityMap(HttpServletRequest request, java.lang.String entityName, GenericEntity ent)
static void
setCurrentEntityMap(HttpServletRequest request, GenericEntity ent)
static void
updateStatsBottomUp(Delegator delegator, java.lang.String contentId, java.util.List<java.lang.String> typeList, int branchChangeAmount, int leafChangeAmount)
static int
updateStatsTopDown(Delegator delegator, java.lang.String contentId, java.util.List<java.lang.String> typeList)
-
-
-
Method Detail
-
mruAdd
public static void mruAdd(HttpServletRequest request, GenericEntity pk, java.lang.String suffix)
-
mruAdd
public static void mruAdd(HttpServletRequest request, GenericEntity pk)
-
mruAdd
public static void mruAdd(HttpSession session, GenericEntity pk)
-
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).
-
setCurrentEntityMap
public static void setCurrentEntityMap(HttpServletRequest request, GenericEntity ent)
-
setCurrentEntityMap
public static void setCurrentEntityMap(HttpServletRequest request, java.lang.String entityName, GenericEntity ent)
-
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)
-
getCurrentValue
public static void getCurrentValue(HttpServletRequest request, Delegator delegator)
-
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.lang.String pubPtId) throws GeneralException
- Throws:
GeneralException
-
getAllPublishPointMap
public static void getAllPublishPointMap(Delegator delegator, java.lang.String pubPtId, java.util.Map<java.lang.String,GenericValue> publishPointMap) throws GeneralException
- 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
-
getWebSitePublishPoint
public static GenericValue getWebSitePublishPoint(Delegator delegator, java.lang.String contentId) throws GenericEntityException
- Throws:
GenericEntityException
-
getWebSitePublishPoint
public static GenericValue getWebSitePublishPoint(Delegator delegator, java.lang.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, java.lang.String contentId) throws GenericEntityException
- Throws:
GenericEntityException
-
getParentWebSitePublishPointId
public static java.lang.String getParentWebSitePublishPointId(Delegator delegator, java.lang.String contentId) throws GenericEntityException
- Throws:
GenericEntityException
-
getStaticValue
public static GenericValue getStaticValue(Delegator delegator, java.lang.String parentPlaceholderId, java.lang.String webSitePublishPointId, boolean ignoreCache) throws GenericEntityException
- Throws:
GenericEntityException
-
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
-
getUserName
public static java.lang.String getUserName(HttpServletRequest request, java.lang.String userLoginId) throws GenericEntityException
- Throws:
GenericEntityException
-
updateStatsTopDown
public static int updateStatsTopDown(Delegator delegator, java.lang.String contentId, java.util.List<java.lang.String> typeList) throws GenericEntityException
- Throws:
GenericEntityException
-
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
-
-