Package com.appiancorp.services
Interface ServiceContext
- All Superinterfaces:
Principal
,com.appiancorp.asl3.servicefw.connect.ServiceContext
- All Known Subinterfaces:
KougarServiceContext
- All Known Implementing Classes:
AbstractServiceContext
,EscalatedServiceContext
,UserServiceContext
,WebServiceContext
public interface ServiceContext
extends Principal, com.appiancorp.asl3.servicefw.connect.ServiceContext
The context used to borrow services from the service provider. The context
contains the following user information which sent to the database:
- Username
- Locale
- Timezone
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addService
(String serviceName_, Object service_) Adds the specifiedService
to the service cache under theserviceName_
key specified.getAttribute
(String key_) Gets the attribute at the specified key.Gets the calendar ID, which is used to calculate date in that calendar.com.appiancorp.asl3.servicefw.connect.ASLIdentity
Deprecated.Gets the locale, which affects which language the database will return for multilingual strings.getName()
Returns the username of the user represented by this context.getService
(String serviceName_) RetrievesService
specified by the given service name from cache.Gets the timezone, which the database uses for time conversions to and from GMT.boolean
Whether this service context has been designated for migration of objects in the system.boolean
isRtl()
removeAttribute
(String key_) Removes the attribute at the specified key from the attribute map.void
removeService
(String serviceName_) Removes the specified service from the service cache.void
setAttribute
(String key_, Object value_) Sets the attribute at the specified key to the specified value.void
setCalendarID
(String calendarID_) Sets the ID of the calendar, which is used to calculate date in that calendar.void
Sets the locale, which affects which language the database will return for multilingual strings.void
setTimeZone
(TimeZone timeZone_) Sets the timezone, which the database uses for time conversions to and from GMT.
-
Method Details
-
getName
String getName()Returns the username of the user represented by this context. -
getService
RetrievesService
specified by the given service name from cache.- Specified by:
getService
in interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext
- Parameters:
serviceName_
- the service name- Returns:
- the service
- See Also:
-
addService
Adds the specifiedService
to the service cache under theserviceName_
key specified. If the key already exists, then it is overwritten with the new value.- Specified by:
addService
in interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext
- Parameters:
serviceName_
- the name of the serviceservice_
- the service- See Also:
-
removeService
Removes the specified service from the service cache.- Specified by:
removeService
in interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext
- Parameters:
serviceName_
- the name of the service- See Also:
-
getIdentity
Deprecated.UsegetName()
instead.Returns theASLIdentity
object that was used to create theServiceContext
.- Specified by:
getIdentity
in interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext
- Returns:
- the
ASLIdentity
used to create theServiceContext
-
setAttribute
Sets the attribute at the specified key to the specified value.- Specified by:
setAttribute
in interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext
- Parameters:
key_
- the keyvalue_
- the value- See Also:
-
getAttribute
Gets the attribute at the specified key.- Specified by:
getAttribute
in interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext
- Parameters:
key_
- the key- Returns:
- the attribute value
- See Also:
-
removeAttribute
Removes the attribute at the specified key from the attribute map.- Specified by:
removeAttribute
in interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext
- Parameters:
key_
- the key- Returns:
- the attribute value before it was removed
- See Also:
-
setLocale
Sets the locale, which affects which language the database will return for multilingual strings.- Specified by:
setLocale
in interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext
- Parameters:
locale_
- the locale- See Also:
-
getLocale
Locale getLocale()Gets the locale, which affects which language the database will return for multilingual strings.- Specified by:
getLocale
in interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext
- Returns:
- the locale
- See Also:
-
setTimeZone
Sets the timezone, which the database uses for time conversions to and from GMT.- Specified by:
setTimeZone
in interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext
- Parameters:
timeZone_
- the timezone- See Also:
-
getTimeZone
TimeZone getTimeZone()Gets the timezone, which the database uses for time conversions to and from GMT.- Specified by:
getTimeZone
in interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext
- Returns:
- the timezone
- See Also:
-
setCalendarID
Sets the ID of the calendar, which is used to calculate date in that calendar.- Parameters:
calendar_
- the calendarID- See Also:
-
#getCalendar()
-
getCalendarID
String getCalendarID()Gets the calendar ID, which is used to calculate date in that calendar.- Returns:
- the Calendar ID
- See Also:
-
#setCalendar(String)
-
isDesignatedForMigration
boolean isDesignatedForMigration()Whether this service context has been designated for migration of objects in the system.- Returns:
- whether the service context is designated for migration
-
isRtl
boolean isRtl()
-
getName()
instead.