Package org.apache.ofbiz.content
Class ContentManagementServices
java.lang.Object
org.apache.ofbiz.content.ContentManagementServices
ContentManagementServices Class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addRoleToUser
(Delegator delegator, LocalDispatcher dispatcher, Map<String, Object> serviceContext) changeLeafToNode
(DispatchContext dctx, Map<String, ? extends Object> context) clearContentAssocDataResourceViewCache
(DispatchContext dctx, Map<String, ? extends Object> context) clearContentAssocViewCache
(DispatchContext dctx, Map<String, ? extends Object> context) decrementContentChildStats
(DispatchContext dctx, Map<String, ? extends Object> context) findSubNodes
(DispatchContext dctx, Map<String, ? extends Object> context) followNodeChildren
(DispatchContext dctx, Map<String, ? extends Object> context) followNodeChildrenMethod
(GenericValue content, LocalDispatcher dispatcher, String serviceName, Map<String, Object> context) getContent
(DispatchContext dctx, Map<String, ? extends Object> context) getContent This service calls a same-named method in ContentWorker to do the work.getSubContent
(DispatchContext dctx, Map<String, ? extends Object> context) getSubContent Finds the related subContent given the template Content and the mapKey.incrementContentChildStats
(DispatchContext dctx, Map<String, ? extends Object> context) initContentChildCounts
(DispatchContext dctx, Map<String, ? extends Object> context) persistContentAndAssoc
(DispatchContext dctx, Map<String, ? extends 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.persistDataResourceAndData
(DispatchContext dctx, Map<String, ? extends Object> context) persistDataResourceAndDataMethod
(DispatchContext dctx, Map<String, ? extends Object> rcontext) resequence
(DispatchContext dctx, Map<String, ? extends 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 nextresetToOutlineMode
(DispatchContext dctx, Map<String, ? extends Object> rcontext) updateContentChildStats
(DispatchContext dctx, Map<String, ? extends Object> context) updateContentSubscription
(DispatchContext dctx, Map<String, ? extends Object> context) updateContentSubscriptionByOrder
(DispatchContext dctx, Map<String, ? extends Object> rcontext) updateContentSubscriptionByProduct
(DispatchContext dctx, Map<String, ? extends Object> rcontext) updateLeafCount
(DispatchContext dctx, Map<String, ? extends Object> context) updateOrRemove
(DispatchContext dctx, Map<String, ? extends Object> context) static void
updateOutlineNodeChildren
(GenericValue content, boolean forceOutline, Map<String, Object> context) static void
updatePageNodeChildren
(GenericValue content, Map<String, Object> context) updatePageType
(DispatchContext dctx, Map<String, ? extends Object> rcontext) This service changes the contentTypeId of the current content and its children depending on the pageMode.updateSiteRoles
(DispatchContext dctx, Map<String, ? extends Object> context) Service for update publish sites with a ContentRole that will tie them to the passed in party.updateSiteRolesDyn
(DispatchContext dctx, Map<String, ? extends Object> context) static String
updateTypeAndFile
(GenericValue dataResource, Map<String, Object> context)
-
Constructor Details
-
ContentManagementServices
public ContentManagementServices()
-
-
Method Details
-
getSubContent
public static Map<String,Object> getSubContent(DispatchContext dctx, Map<String, ? extends 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 Map<String,Object> getContent(DispatchContext dctx, Map<String, ? extends Object> context) getContent This service calls a same-named method in ContentWorker to do the work. -
persistContentAndAssoc
public static Map<String,Object> persistContentAndAssoc(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceExceptionpersistContentAndAssoc 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 Map<String,Object> updateSiteRoles(DispatchContext dctx, Map<String, ? extends Object> context) Service for update publish sites with a ContentRole that will tie them to the passed in party. -
persistDataResourceAndData
-
persistDataResourceAndDataMethod
public static Map<String,Object> persistDataResourceAndDataMethod(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException, GenericEntityException -
addRoleToUser
public static void addRoleToUser(Delegator delegator, LocalDispatcher dispatcher, Map<String, Object> serviceContext) throws GenericServiceException, GenericEntityException -
updateSiteRolesDyn
-
updateOrRemove
-
resequence
public static Map<String,Object> resequence(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceExceptionReorder 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
-
changeLeafToNode
public static Map<String,Object> changeLeafToNode(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException- Throws:
GenericServiceException
-
updateLeafCount
public static Map<String,Object> updateLeafCount(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException- Throws:
GenericServiceException
-
updatePageType
public static Map<String,Object> updatePageType(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceExceptionThis 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
-
resetToOutlineMode
public static Map<String,Object> resetToOutlineMode(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException- Throws:
GenericServiceException
-
clearContentAssocViewCache
public static Map<String,Object> clearContentAssocViewCache(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException- Throws:
GenericServiceException
-
clearContentAssocDataResourceViewCache
public static Map<String,Object> clearContentAssocDataResourceViewCache(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException- Throws:
GenericServiceException
-
updatePageNodeChildren
public static void updatePageNodeChildren(GenericValue content, Map<String, Object> context) throws GenericEntityException- Throws:
GenericEntityException
-
updateOutlineNodeChildren
public static void updateOutlineNodeChildren(GenericValue content, boolean forceOutline, Map<String, Object> context) throws GenericEntityException- Throws:
GenericEntityException
-
findSubNodes
public static Map<String,Object> findSubNodes(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException- Throws:
GenericServiceException
-
updateTypeAndFile
-
initContentChildCounts
public static Map<String,Object> initContentChildCounts(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException- Throws:
GenericServiceException
-
incrementContentChildStats
public static Map<String,Object> incrementContentChildStats(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException- Throws:
GenericServiceException
-
decrementContentChildStats
public static Map<String,Object> decrementContentChildStats(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException- Throws:
GenericServiceException
-
updateContentChildStats
public static Map<String,Object> updateContentChildStats(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException- Throws:
GenericServiceException
-
updateContentSubscription
public static Map<String,Object> updateContentSubscription(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException- Throws:
GenericServiceException
-
updateContentSubscriptionByProduct
public static Map<String,Object> updateContentSubscriptionByProduct(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException- Throws:
GenericServiceException
-
updateContentSubscriptionByOrder
public static Map<String,Object> updateContentSubscriptionByOrder(DispatchContext dctx, Map<String, ? extends Object> rcontext) throws GenericServiceException- Throws:
GenericServiceException
-
followNodeChildren
public static Map<String,Object> followNodeChildren(DispatchContext dctx, Map<String, ? extends Object> context) throws GenericServiceException- Throws:
GenericServiceException
-
followNodeChildrenMethod
public static Map<String,Object> followNodeChildrenMethod(GenericValue content, LocalDispatcher dispatcher, String serviceName, Map<String, Object> context) throws GenericEntityException, GenericServiceException
-