Java com.liferay.portal.kernel.service ServiceContext fields, constructors, methods, implement or subclass

Example usage for Java com.liferay.portal.kernel.service ServiceContext fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.liferay.portal.kernel.service ServiceContext.

The text is from its open source code.

Constructor

ServiceContext()
Creates a new service context object with an attributes map and an expando bridge attributes map.

Method

Objectclone()
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.
doublegetAssetPriority()
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.
SerializablegetAttribute(String name)
Returns the serializable object associated with the name of the standard parameter of this service context.
MapgetAttributes()
Returns the map of name/value pairs that are the standard parameters of this service context.
StringgetCommand()
Returns the value of the Constants#CMD parameter used in most Liferay forms for internal portlets.
longgetCompanyId()
Returns the company ID of this service context's current portal instance.
DategetCreateDate(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.
DategetCreateDate()
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.
StringgetCurrentURL()
Returns the current URL of this service context
MapgetExpandoBridgeAttributes()
Returns an arbitrary number of attributes of an entity to be persisted.
longgetGuestOrUserId()
Returns this service context's user ID or guest ID if no user ID is available.
MapgetHeaders()
Returns the the map of request header name/value pairs of this service context.
StringgetLanguageId()
Returns the language ID of the locale of this service context's current user.
StringgetLayoutFullURL()
Returns the complete URL of the current page if a page context can be determined for this service context.
LiferayPortletRequestgetLiferayPortletRequest()
LiferayPortletResponsegetLiferayPortletResponse()
LocalegetLocale()
ModelPermissionsgetModelPermissions()
DategetModifiedDate(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.
DategetModifiedDate()
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.
StringgetPathMain()
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.
StringgetPortalURL()
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.
StringgetPortletId()
Returns the ID of the current portlet if this service context is being passed as a parameter to a portlet.
HttpServletRequestgetRequest()
longgetScopeGroupId()
Returns the ID of the group corresponding to the current data scope of this service context.
ThemeDisplaygetThemeDisplay()
TimeZonegetTimeZone()
longgetUserId()
Returns the ID of this service context's current user.
StringgetUuid()
Returns the UUID of this service context's current entity.
intgetWorkflowAction()
Returns the workflow action to take if this service context is being passed as a parameter to a method that processes a workflow action.
booleanisAddGroupPermissions()
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.
booleanisAddGuestPermissions()
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.
booleanisCommandAdd()
Returns true if this service context contains an add command (i.e.
booleanisCommandUpdate()
Returns true if this service context contains an update command (i.e.
booleanisIndexingEnabled()
Returns whether the primary entity of this service context is to be indexed/re-indexed.
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.
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 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 the Constants#CMD parameter 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.
voidsetExpandoBridgeAttributes(Map expandoBridgeAttributes)
Sets an arbitrary number of attributes of an entity to be persisted.
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.
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.
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.
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.
voidsetUuid(String uuid)
Sets 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.
Stringtranslate(String pattern, Object... arguments)
voidvalidateModifiedDate(AuditedModel auditedModel, Class clazz)