Class ServiceContext
- All Implemented Interfaces:
Serializable,Cloneable
The ServiceContext object simplifies method signatures and
provides a way to consolidate many different methods with different sets of
optional parameters into a single, easier to use method. It also aggregates
information necessary for transversal features such as permissioning,
tagging, categorization, etc.
- Author:
- Raymond Augé, Brian Wing Shun Chan, Jorge Ferrer
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a new service context object identical to this service context object.voidderiveDefaultPermissions(long repositoryId, String modelName) Derive default permissions based on the logic found in portal-web/docroot/html/taglib/ui/input_permissions/page.jsp.long[]Returns the asset category IDs to be applied to an asset entry if the service context is being passed as a parameter to a method which manipulates the asset entry.long[]Returns the primary keys of the asset entries linked to an asset entry if the service context is being passed as a parameter to a method which manipulates the asset entry.doubleReturns the priority of an asset entry if this service context is being passed as a parameter to a method which manipulates the asset entry.String[]Returns the asset tag names to be applied to an asset entry if the service context is being passed as a parameter to a method which manipulates the asset entry.getAttribute(String name) Returns the serializable object associated with the name of the standard parameter of this service context.Returns the map of name/value pairs that are the standard parameters of this service context.Returns the value of theConstants.CMDparameter used in most Liferay forms for internal portlets.longReturns the company ID of this service context's current portal instance.Returns the date when an entity was created if this service context is being passed as a parameter to a method which creates an entity.getCreateDate(Date defaultCreateDate) Returns the date when an entity was created (or a default date) if this service context is being passed as a parameter to a method which creates an entity.Returns the current URL of this service contextReturns an arbitrary number of attributes of an entity to be persisted.Returns the date when anaui:formwas generated in this service context.longReturns this service context's user ID or guest ID if no user ID is available.Returns the the map of request header name/value pairs of this service context.Returns the language ID of the locale of this service context's current user.Returns the complete URL of the current page if a page context can be determined for this service context.Returns the relative URL of the current page if a page context can be determined for this service context.Returns the date when an entity was modified if this service context is being passed as a parameter to a method which updates an entity.getModifiedDate(Date defaultModifiedDate) Returns the date when an entity was modified if this service context is being passed as a parameter to a method which modifies an entity.Returns the main context path of the portal, concatenated with/c.longgetPlid()Returns the portal layout ID of the current page of this service context.Returns the URL of this service context's portal, including the protocol, domain, and non-default port relative to the company instance and any virtual host.Returns the ID of the current portlet if this service context is being passed as a parameter to a portlet.Returns the portlet preferences IDs of the current portlet if the service context is being passed as a parameter to a portlet.Returns the remote address of the user making the request in this service context.Returns the remote host name of the user making the request in this service context.javax.servlet.http.HttpServletRequestjavax.servlet.http.HttpServletResponselongReturns the ID of the group corresponding to the current data scope of this service context.Returns the user-agent request header of this service context.Returns the complete URL of this service context's current user's profile page.longReturns the ID of this service context's current user.getUuid()Returns the UUID of this service context's current entity.intReturns the workflow action to take if this service context is being passed as a parameter to a method that processes a workflow action.booleanReturnstrueif this service context is being passed as a parameter to a method which manipulates a resource to which default group permissions apply.booleanReturnstrueif this service context is being passed as a parameter to a method which manipulates a resource to which default guest permissions apply.booleanbooleanReturnstrueif this service context contains an add command (i.e. has command valueConstants.ADD)booleanReturnstrueif this service context contains an update command (i.e. has command valueConstants.UPDATE)booleanbooleanReturnstrueif portal exceptions should be handled as failures, possibly halting processing, orfalseif the exceptions should be handled differently, possibly allowing processing to continue in some manner.booleanReturns whether the primary entity of this service context is to be indexed/re-indexed.booleanReturnstrueif the sender of this service context's request is signed in.booleanvoidmerge(ServiceContext serviceContext) Merges all of the specified service context's non-nullattributes, attributes greater than0, and fields (except the request) with this service context object.removeAttribute(String name) Removes the mapping of the serializable object to the name of the standard parameter of this service context.voidsetAddGroupPermissions(boolean addGroupPermissions) Sets whether or not default group permissions should apply to a resource being manipulated by a method to which this service context is passed as a parameter.voidsetAddGuestPermissions(boolean addGuestPermissions) Sets whether or not default guest permissions should apply to a resource being manipulated by a method to which this service context is passed as a parameter.voidsetAssetCategoryIds(long[] assetCategoryIds) Sets an array of asset category IDs to be applied to an asset entry if this service context is being passed as a parameter to a method which manipulates the asset entry.voidsetAssetEntryVisible(boolean assetEntryVisible) voidsetAssetLinkEntryIds(long[] assetLinkEntryIds) Sets an array of the primary keys of asset entries to be linked to an asset entry if this service context is being passed as a parameter to a method which manipulates the asset entry.voidsetAssetPriority(double assetPriority) Sets the priority of an asset entry if this service context is being passed as a parameter to a method which manipulates the asset entry.voidsetAssetTagNames(String[] assetTagNames) Sets an array of asset tag names to be applied to an asset entry if this service context is being passed as a parameter to a method which manipulates the asset entry.voidsetAttribute(String name, Serializable value) Sets a mapping of a standard parameter's name to its serializable object.voidsetAttributes(Map<String, Serializable> attributes) Sets the map of the name/value pairs that are the standard parameters of this service context.voidsetCommand(String command) Sets the value of theConstants.CMDparameter used in most Liferay forms for internal portlets.voidsetCompanyId(long companyId) Sets the company ID of this service context's current portal instance.voidsetCreateDate(Date createDate) Sets the date when an entity was created if this service context is being passed as a parameter to a method which creates an entity.voidsetCurrentURL(String currentURL) Sets the current URL of this service contextvoidsetDeriveDefaultPermissions(boolean deriveDefaultPermissions) voidsetExpandoBridgeAttributes(Map<String, Serializable> expandoBridgeAttributes) Sets an arbitrary number of attributes of an entity to be persisted.voidsetFailOnPortalException(boolean failOnPortalException) Sets whether portal exceptions should be handled as failures, possibly halting processing, or if exceptions should be handled differently, possibly allowing processing to continue in some manner.voidsetFormDate(Date formDate) Sets the date when anaui:formwas generated in this service context.voidsetHeaders(Map<String, String> headers) Sets the map of request header name/value pairs of this service context.voidsetIndexingEnabled(boolean indexingEnabled) Sets whether the primary entity of this service context is to be indexed/re-indexed.voidsetLanguageId(String languageId) Sets the language ID of the locale of this service context.voidsetLayoutFullURL(String layoutFullURL) Sets the complete URL of the current page for this service context.voidsetLayoutURL(String layoutURL) Sets the relative URL of the current page for this service context.voidsetModelPermissions(ModelPermissions modelPermissions) voidsetModifiedDate(Date modifiedDate) Sets the date when an entity was modified in this service context.voidsetPathFriendlyURLPrivateGroup(String pathFriendlyURLPrivateGroup) voidsetPathFriendlyURLPrivateUser(String pathFriendlyURLPrivateUser) voidsetPathFriendlyURLPublic(String pathFriendlyURLPublic) voidsetPathMain(String pathMain) Sets the main context path of the portal, concatenated with/c.voidsetPlid(long plid) Sets the portal layout ID of the current page in this service context.voidsetPortalURL(String portalURL) Sets the URL of this service context's portal, including the protocol, domain, and non-default port relative to the company instance and any virtual host.voidsetPortletId(String portletId) voidsetPortletPreferencesIds(PortletPreferencesIds portletPreferencesIds) Sets the portlet preferences IDs of the current portlet if this service context is being passed as a parameter to a portlet.voidsetRemoteAddr(String remoteAddr) Sets the remote address of the user making the request in this service context.voidsetRemoteHost(String remoteHost) Sets the remote host name of the user making the request in this service context.voidsetRequest(javax.servlet.http.HttpServletRequest httpServletRequest) Sets the optional request used when instantiating this service context.voidsetScopeGroupId(long scopeGroupId) Sets the ID of the group corresponding to the current data scope of this service context.voidsetSignedIn(boolean signedIn) Sets whether the sender of this service context's request is signed in.voidsetStrictAdd(boolean strictAdd) voidsetTimeZone(TimeZone timeZone) voidsetUserDisplayURL(String userDisplayURL) Sets the complete URL of this service context's current user's profile page.voidsetUserId(long userId) Sets the ID of this service context's current user.voidSets the UUID of this service context's current entity.voidsetWorkflowAction(int workflowAction) Sets the workflow action to take if this service context is being passed as parameter to a method that processes a workflow action.voidvalidateModifiedDate(AuditedModel auditedModel, Class<? extends PortalException> clazz)
-
Constructor Details
-
ServiceContext
public ServiceContext()
-
-
Method Details
-
clone
Returns a new service context object identical to this service context object. -
deriveDefaultPermissions
Derive default permissions based on the logic found in portal-web/docroot/html/taglib/ui/input_permissions/page.jsp. Do not update this logic updating the logic in the JSP.- Throws:
PortalException
-
fetchUser
-
getAssetCategoryIds
public long[] getAssetCategoryIds()Returns the asset category IDs to be applied to an asset entry if the service context is being passed as a parameter to a method which manipulates the asset entry.- Returns:
- the asset category IDs
-
getAssetLinkEntryIds
public long[] getAssetLinkEntryIds()Returns the primary keys of the asset entries linked to an asset entry if the service context is being passed as a parameter to a method which manipulates the asset entry.- Returns:
- the primary keys of the asset entries
-
getAssetPriority
public double getAssetPriority()Returns the priority of an asset entry if this service context is being passed as a parameter to a method which manipulates the asset entry.- Returns:
- the asset entry's priority
-
getAssetTagNames
Returns the asset tag names to be applied to an asset entry if the service context is being passed as a parameter to a method which manipulates the asset entry.- Returns:
- the asset tag names
-
getAttribute
Returns the serializable object associated with the name of the standard parameter of this service context.- Parameters:
name- the name of the standard parameter- Returns:
- the serializable object associated with the name
-
getAttributes
Returns the map of name/value pairs that are the standard parameters of this service context. Each value is serializable.- Returns:
- the map of name/value pairs
-
getCommand
Returns the value of theConstants.CMDparameter used in most Liferay forms for internal portlets.- Returns:
- the value of the command parameter
-
getCompanyId
public long getCompanyId()Returns the company ID of this service context's current portal instance.- Returns:
- the company ID
-
getCreateDate
Returns the date when an entity was created if this service context is being passed as a parameter to a method which creates an entity.- Returns:
- the creation date
-
getCreateDate
Returns the date when an entity was created (or a default date) if this service context is being passed as a parameter to a method which creates an entity.- Parameters:
defaultCreateDate- an optional default create date to use if the service context does not have a create date- Returns:
- the creation date if available; the default date otherwise
-
getCurrentURL
Returns the current URL of this service context- Returns:
- the current URL
-
getExpandoBridgeAttributes
Returns an arbitrary number of attributes of an entity to be persisted.These attributes only include fields that this service context does not possess by default.
- Returns:
- the expando bridge attributes
-
getFormDate
Returns the date when anaui:formwas generated in this service context. The form date can be used in detecting situations in which an entity has been modified while another client was editing that entity.Example:
Person1 and person2 start editing the same version of a Web Content article. Person1 publishes changes to the article first. When person2 attempts to publish changes to that article, the service implementation finds that a modification to that article has already been published some time after person2 started editing the article. Since the the article modification date was found to be later than the form date for person2, person2 could be alerted to the modification and make a backup copy of his edits before synchronizing with the published changes by person1.
-
getGuestOrUserId
Returns this service context's user ID or guest ID if no user ID is available.- Returns:
- the user ID, or guest ID if there is no user in this service
context, or
0if there is no company in this service context - Throws:
PortalException
-
getHeaders
Returns the the map of request header name/value pairs of this service context.- Returns:
- the the map of request header name/value pairs
- See Also:
-
getLanguageId
Returns the language ID of the locale of this service context's current user.- Returns:
- the language ID
-
getLayoutFullURL
Returns the complete URL of the current page if a page context can be determined for this service context.- Returns:
- the complete URL of the current page
-
getLayoutURL
Returns the relative URL of the current page if a page context can be determined for this service context.- Returns:
- the relative URL of the current page
-
getLiferayPortletRequest
-
getLiferayPortletResponse
-
getLocale
-
getModelPermissions
-
getModifiedDate
Returns the date when an entity was modified if this service context is being passed as a parameter to a method which updates an entity.- Returns:
- the date when an entity was modified if this service context is being passed as a parameter to a method which updates an entity
-
getModifiedDate
Returns the date when an entity was modified if this service context is being passed as a parameter to a method which modifies an entity.- Parameters:
defaultModifiedDate- an optional default modified date to use if this service context does not have a modified date- Returns:
- the modified date if available; the default date otherwise
-
getPathFriendlyURLPrivateGroup
-
getPathFriendlyURLPrivateUser
-
getPathFriendlyURLPublic
-
getPathMain
Returns the main context path of the portal, concatenated with/c.- Returns:
- the main context path of the portal
-
getPlid
public long getPlid()Returns the portal layout ID of the current page of this service context.- Returns:
- the portal layout ID of the current page
-
getPortalURL
Returns the URL of this service context's portal, including the protocol, domain, and non-default port relative to the company instance and any virtual host.The URL returned does not include the port if a default port is used.
- Returns:
- the URL of this service context's portal, including the protocol, domain, and non-default port relative to company instance and any virtual host
-
getPortletId
Returns the ID of the current portlet if this service context is being passed as a parameter to a portlet.- Returns:
- the ID of the current portlet
- See Also:
-
getPortletPreferencesIds
Returns the portlet preferences IDs of the current portlet if the service context is being passed as a parameter to a portlet.The
PortletPreferencesIdscan be used to look up portlet preferences of the current portlet.- Returns:
- the portlet preferences IDs of the current portlet
- See Also:
-
getRemoteAddr
Returns the remote address of the user making the request in this service context.- Returns:
- the remote address of the user making the request
-
getRemoteHost
Returns the remote host name of the user making the request in this service context.- Returns:
- the remote host name of the user making the request
-
getRequest
-
getResponse
-
getRootPortletId
-
getScopeGroup
- Throws:
PortalException
-
getScopeGroupId
public long getScopeGroupId()Returns the ID of the group corresponding to the current data scope of this service context.- Returns:
- the ID of the group corresponding to the current data scope
- See Also:
-
getThemeDisplay
-
getTimeZone
-
getUserAgent
Returns the user-agent request header of this service context.- Returns:
- the user-agent request header
- See Also:
-
getUserDisplayURL
Returns the complete URL of this service context's current user's profile page.- Returns:
- the complete URL of this service context's current user's profile page
-
getUserId
public long getUserId()Returns the ID of this service context's current user.- Returns:
- the ID of this service context's current user
-
getUuid
Returns the UUID of this service context's current entity.To ensure the same UUID is never used by two entities, the UUID is reset to
nullupon invoking this method.- Returns:
- the UUID of this service context's current entity
-
getUuidWithoutReset
-
getWorkflowAction
public int getWorkflowAction()Returns the workflow action to take if this service context is being passed as a parameter to a method that processes a workflow action.- Returns:
- the workflow action to take
-
isAddGroupPermissions
public boolean isAddGroupPermissions()Returnstrueif this service context is being passed as a parameter to a method which manipulates a resource to which default group permissions apply.- Returns:
trueif this service context is being passed as a parameter to a method which manipulates a resource to which default group permissions apply;falseotherwise
-
isAddGuestPermissions
public boolean isAddGuestPermissions()Returnstrueif this service context is being passed as a parameter to a method which manipulates a resource to which default guest permissions apply.- Returns:
trueif this service context is being passed as a parameter to a method which manipulates a resource to which default guest permissions apply;falseotherwise
-
isAssetEntryVisible
public boolean isAssetEntryVisible() -
isCommandAdd
public boolean isCommandAdd()Returnstrueif this service context contains an add command (i.e. has command valueConstants.ADD)- Returns:
trueif this service context contains an add command;falseotherwise
-
isCommandUpdate
public boolean isCommandUpdate()Returnstrueif this service context contains an update command (i.e. has command valueConstants.UPDATE)- Returns:
trueif this service context contains an update command;falseotherwise
-
isDeriveDefaultPermissions
public boolean isDeriveDefaultPermissions() -
isFailOnPortalException
public boolean isFailOnPortalException()Returnstrueif portal exceptions should be handled as failures, possibly halting processing, orfalseif the exceptions should be handled differently, possibly allowing processing to continue in some manner. Services may check this flag to execute desired behavior.Batch invocation of such services (exposed as a JSON web services) can result in execution of all service invocations, in spite of portal exceptions.
If this flag is set to
false, services can implement logic that allows processing to continue, while collecting information regarding the exceptions for returning to the caller. For example, theAssetVocabularyServiceImpl.deleteVocabularies(long[], ServiceContext)method uses the list it returns to give information on vocabularies it fails to delete; it returns an empty list if all deletions are successful.- Returns:
trueif portal exceptions are to be handled as failures;falseif portal exceptions can be handled differently, possibly allowing processing to continue in some manner
-
isIndexingEnabled
public boolean isIndexingEnabled()Returns whether the primary entity of this service context is to be indexed/re-indexed.- Returns:
truethe primary entity of this service context is to be indexed/re-indexed;falseotherwise
-
isSignedIn
public boolean isSignedIn()Returnstrueif the sender of this service context's request is signed in.- Returns:
trueif the sender of this service context's request is signed in;falseotherwise
-
isStrictAdd
public boolean isStrictAdd() -
merge
Merges all of the specified service context's non-nullattributes, attributes greater than0, and fields (except the request) with this service context object.- Parameters:
serviceContext- the service context object to be merged
-
removeAttribute
Removes the mapping of the serializable object to the name of the standard parameter of this service context.- Parameters:
name- the name of the standard parameter- Returns:
- the serializable object associated to the name
-
setAddGroupPermissions
public void setAddGroupPermissions(boolean addGroupPermissions) Sets whether or not default group permissions should apply to a resource being manipulated by a method to which this service context is passed as a parameter.- Parameters:
addGroupPermissions- indicates whether or not to apply default group permissions
-
setAddGuestPermissions
public void setAddGuestPermissions(boolean addGuestPermissions) Sets whether or not default guest permissions should apply to a resource being manipulated by a method to which this service context is passed as a parameter.- Parameters:
addGuestPermissions- indicates whether or not to apply default guest permissions
-
setAssetCategoryIds
public void setAssetCategoryIds(long[] assetCategoryIds) Sets an array of asset category IDs to be applied to an asset entry if this service context is being passed as a parameter to a method which manipulates the asset entry.- Parameters:
assetCategoryIds- the primary keys of the asset categories
-
setAssetEntryVisible
public void setAssetEntryVisible(boolean assetEntryVisible) -
setAssetLinkEntryIds
public void setAssetLinkEntryIds(long[] assetLinkEntryIds) Sets an array of the primary keys of asset entries to be linked to an asset entry if this service context is being passed as a parameter to a method which manipulates the asset entry.- Parameters:
assetLinkEntryIds- the primary keys of the asset entries to be linked to an asset entry
-
setAssetPriority
public void setAssetPriority(double assetPriority) Sets the priority of an asset entry if this service context is being passed as a parameter to a method which manipulates the asset entry.- Parameters:
assetPriority- the priority of an asset entry
-
setAssetTagNames
Sets an array of asset tag names to be applied to an asset entry if this service context is being passed as a parameter to a method which manipulates the asset entry.- Parameters:
assetTagNames- the tag names to be applied to an asset entry
-
setAttribute
Sets a mapping of a standard parameter's name to its serializable object.- Parameters:
name- the standard parameter name to associate with the valuevalue- the serializable object to be associated with the name
-
setAttributes
Sets the map of the name/value pairs that are the standard parameters of this service context. Each value must be serializable.- Parameters:
attributes- the map of the name/value pairs that are the standard parameters of this service context
-
setCommand
Sets the value of theConstants.CMDparameter used in most Liferay forms for internal portlets.- Parameters:
command- the value of theConstants.CMDparameter
-
setCompanyId
public void setCompanyId(long companyId) Sets the company ID of this service context's current portal instance.- Parameters:
companyId- the primary key of this service context's current portal instance
-
setCreateDate
Sets the date when an entity was created if this service context is being passed as a parameter to a method which creates an entity.- Parameters:
createDate- the date the entity was created
-
setCurrentURL
Sets the current URL of this service context- Parameters:
currentURL- the current URL of this service context
-
setDeriveDefaultPermissions
public void setDeriveDefaultPermissions(boolean deriveDefaultPermissions) -
setExpandoBridgeAttributes
Sets an arbitrary number of attributes of an entity to be persisted.These attributes should only include fields that
ServiceContextdoes not possess by default.- Parameters:
expandoBridgeAttributes- the expando bridge attributes (optionallynull)
-
setFailOnPortalException
public void setFailOnPortalException(boolean failOnPortalException) Sets whether portal exceptions should be handled as failures, possibly halting processing, or if exceptions should be handled differently, possibly allowing processing to continue in some manner.- Parameters:
failOnPortalException- whether portal exceptions should be handled as failures, or if portal exceptions should be handled differently, possibly allowing processing to continue in some manner- See Also:
-
setFormDate
Sets the date when anaui:formwas generated in this service context. The form date can be used in detecting situations in which an entity has been modified while another client was editing that entity.Example:
Person1 and person2 start editing the same version of a Web Content article. Person1 publishes changes to the article first. When person2 attempts to publish changes to that article, the service implementation finds that a modification to that article has already been published some time after person2 started editing the article. Since the article modification date was found to be later than the form date for person2, person2 could be alerted to the modification and make a backup copy of his edits before synchronizing with the published changes by person1.
- Parameters:
formDate- the date that anaui:formwas generated for this service context (optionallynull)
-
setHeaders
Sets the map of request header name/value pairs of this service context.- Parameters:
headers- map of request header name/value pairs of this service context- See Also:
-
setIndexingEnabled
public void setIndexingEnabled(boolean indexingEnabled) Sets whether the primary entity of this service context is to be indexed/re-indexed.The entity is only indexed/re-indexed if the method receiving this service context as a parameter does indexing.
- Parameters:
indexingEnabled- whether the primary entity of this service context is to be indexed/re-indexed (default istrue)
-
setLanguageId
Sets the language ID of the locale of this service context.- Parameters:
languageId- the language ID of the locale of this service context's current user
-
setLayoutFullURL
Sets the complete URL of the current page for this service context.- Parameters:
layoutFullURL- the complete URL of the current page if a page context can be determined for this service context
-
setLayoutURL
Sets the relative URL of the current page for this service context.- Parameters:
layoutURL- the relative URL of the current page if a page context can be determined for this service context
-
setModelPermissions
-
setModifiedDate
Sets the date when an entity was modified in this service context.- Parameters:
modifiedDate- the date when an entity was modified in this service context
-
setPathFriendlyURLPrivateGroup
-
setPathFriendlyURLPrivateUser
-
setPathFriendlyURLPublic
-
setPathMain
Sets the main context path of the portal, concatenated with/c.- Parameters:
pathMain- the main context path of the portal
-
setPlid
public void setPlid(long plid) Sets the portal layout ID of the current page in this service context.- Parameters:
plid- the portal layout ID of the current page
-
setPortalURL
Sets the URL of this service context's portal, including the protocol, domain, and non-default port relative to the company instance and any virtual host.The URL should not include the port if a default port is used.
- Parameters:
portalURL- the portal URL
-
setPortletId
-
setPortletPreferencesIds
Sets the portlet preferences IDs of the current portlet if this service context is being passed as a parameter to a portlet.The
PortletPreferencesIdscan be used to look up portlet preferences of the current portlet.- Parameters:
portletPreferencesIds- the portlet preferences- See Also:
-
setRemoteAddr
Sets the remote address of the user making the request in this service context.- Parameters:
remoteAddr- the remote address of the user making the request in this service context
-
setRemoteHost
Sets the remote host name of the user making the request in this service context.- Parameters:
remoteHost- the remote host name of the user making the request in this service context
-
setRequest
public void setRequest(javax.servlet.http.HttpServletRequest httpServletRequest) Sets the optional request used when instantiating this service context. The field is volatile and so will be discarded on serialization.- Parameters:
httpServletRequest- the request
-
setScopeGroupId
public void setScopeGroupId(long scopeGroupId) Sets the ID of the group corresponding to the current data scope of this service context.- Parameters:
scopeGroupId- the ID of the group corresponding to the current data scope of this service context- See Also:
-
setSignedIn
public void setSignedIn(boolean signedIn) Sets whether the sender of this service context's request is signed in.- Parameters:
signedIn- whether the sender of this service context's request is signed in
-
setStrictAdd
public void setStrictAdd(boolean strictAdd) -
setTimeZone
-
setUserDisplayURL
Sets the complete URL of this service context's current user's profile page.- Parameters:
userDisplayURL- the complete URL of the current user's profile page
-
setUserId
public void setUserId(long userId) Sets the ID of this service context's current user.- Parameters:
userId- the ID of the current user
-
setUuid
Sets the UUID of this service context's current entity.- Parameters:
uuid- the UUID of the current entity
-
setWorkflowAction
public void setWorkflowAction(int workflowAction) Sets the workflow action to take if this service context is being passed as parameter to a method that processes a workflow action.- Parameters:
workflowAction- workflow action to take (default isWorkflowConstants.ACTION_PUBLISH)
-
translate
-
validateModifiedDate
public void validateModifiedDate(AuditedModel auditedModel, Class<? extends PortalException> clazz) throws PortalException - Throws:
PortalException
-