Example usage for Java com.liferay.portal.kernel.service ServiceContext fields, constructors, methods, implement or subclass
The text is from its open source code.
ServiceContext() Creates a new service context object with an attributes map and an expando bridge attributes map. |
Object | clone() Returns a new service context object identical to this service context object. |
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. |
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. |
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. |
String[] | 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. |
Serializable | getAttribute(String name) Returns the serializable object associated with the name of the standard parameter of this service context. |
Map | getAttributes() Returns the map of name/value pairs that are the standard parameters of this service context. |
String | getCommand() Returns the value of the Constants#CMD parameter used in most Liferay forms for internal portlets. |
long | getCompanyId() Returns the company ID of this service context's current portal instance. |
Date | 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. |
Date | 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. |
String | getCurrentURL() Returns the current URL of this service context |
Map | getExpandoBridgeAttributes() Returns an arbitrary number of attributes of an entity to be persisted. |
long | getGuestOrUserId() Returns this service context's user ID or guest ID if no user ID is available. |
Map | getHeaders() Returns the the map of request header name/value pairs of this service context. |
String | getLanguageId() Returns the language ID of the locale of this service context's current user. |
String | getLayoutFullURL() Returns the complete URL of the current page if a page context can be determined for this service context. |
LiferayPortletRequest | getLiferayPortletRequest() |
LiferayPortletResponse | getLiferayPortletResponse() |
Locale | getLocale() |
ModelPermissions | getModelPermissions() |
Date | 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. |
Date | 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. |
String | getPathMain() Returns the main context path of the portal, concatenated with /c . |
long | getPlid() Returns the portal layout ID of the current page of this service context. |
String | 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. |
String | getPortletId() Returns the ID of the current portlet if this service context is being passed as a parameter to a portlet. |
HttpServletRequest | getRequest() |
long | getScopeGroupId() Returns the ID of the group corresponding to the current data scope of this service context. |
ThemeDisplay | getThemeDisplay() |
TimeZone | getTimeZone() |
long | getUserId() Returns the ID of this service context's current user. |
String | getUuid() Returns the UUID of this service context's current entity. |
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. |
boolean | isAddGroupPermissions() Returns true if this service context is being passed as a parameter to a method which manipulates a resource to which default group permissions apply. |
boolean | isAddGuestPermissions() Returns true if this service context is being passed as a parameter to a method which manipulates a resource to which default guest permissions apply. |
boolean | isCommandAdd() Returns true if this service context contains an add command (i.e. |
boolean | isCommandUpdate() Returns true if this service context contains an update command (i.e. |
boolean | isIndexingEnabled() Returns whether the primary entity of this service context is to be indexed/re-indexed. |
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. |
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. |
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. |
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. |
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. |
void | setAssetTagNames(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. |
void | setAttribute(String name, Serializable value) Sets a mapping of a standard parameter's name to its serializable object. |
void | setAttributes(Map Sets the map of the name/value pairs that are the standard parameters of this service context. |
void | setCommand(String command) Sets the value of the Constants#CMD parameter used in most Liferay forms for internal portlets. |
void | setCompanyId(long companyId) Sets the company ID of this service context's current portal instance. |
void | setCreateDate(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. |
void | setExpandoBridgeAttributes(Map Sets an arbitrary number of attributes of an entity to be persisted. |
void | setIndexingEnabled(boolean indexingEnabled) Sets whether the primary entity of this service context is to be indexed/re-indexed. |
void | setLanguageId(String languageId) Sets the language ID of the locale of this service context. |
void | setLayoutFullURL(String layoutFullURL) Sets the complete URL of the current page for this service context. |
void | setLayoutURL(String layoutURL) Sets the relative URL of the current page for this service context. |
void | setModelPermissions(ModelPermissions modelPermissions) |
void | setModifiedDate(Date modifiedDate) Sets the date when an entity was modified in this service context. |
void | setPathMain(String pathMain) Sets the main context path of the portal, concatenated with /c . |
void | setPlid(long plid) Sets the portal layout ID of the current page in this service context. |
void | setPortalURL(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. |
void | setScopeGroupId(long scopeGroupId) Sets the ID of the group corresponding to the current data scope of this service context. |
void | setSignedIn(boolean signedIn) Sets whether the sender of this service context's request is signed in. |
void | setUserDisplayURL(String userDisplayURL) Sets the complete URL of this service context's current user's profile page. |
void | setUserId(long userId) Sets the ID of this service context's current user. |
void | setUuid(String uuid) Sets the UUID of this service context's current entity. |
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. |
String | translate(String pattern, Object... arguments) |
void | validateModifiedDate(AuditedModel auditedModel, Class extends PortalException> clazz) |