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 TypeMethodDescriptionvoidaddService(String serviceName_, Object service_) Adds the specifiedServiceto 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.ASLIdentityDeprecated.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_) RetrievesServicespecified by the given service name from cache.Gets the timezone, which the database uses for time conversions to and from GMT.booleanWhether this service context has been designated for migration of objects in the system.booleanisRtl()removeAttribute(String key_) Removes the attribute at the specified key from the attribute map.voidremoveService(String serviceName_) Removes the specified service from the service cache.voidsetAttribute(String key_, Object value_) Sets the attribute at the specified key to the specified value.voidsetCalendarID(String calendarID_) Sets the ID of the calendar, which is used to calculate date in that calendar.voidSets the locale, which affects which language the database will return for multilingual strings.voidsetTimeZone(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
RetrievesServicespecified by the given service name from cache.- Specified by:
getServicein interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext- Parameters:
serviceName_- the service name- Returns:
- the service
- See Also:
-
addService
Adds the specifiedServiceto the service cache under theserviceName_key specified. If the key already exists, then it is overwritten with the new value.- Specified by:
addServicein 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:
removeServicein interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext- Parameters:
serviceName_- the name of the service- See Also:
-
getIdentity
Deprecated.UsegetName()instead.Returns theASLIdentityobject that was used to create theServiceContext.- Specified by:
getIdentityin interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext- Returns:
- the
ASLIdentityused to create theServiceContext
-
setAttribute
Sets the attribute at the specified key to the specified value.- Specified by:
setAttributein interfacecom.appiancorp.asl3.servicefw.connect.ServiceContext- Parameters:
key_- the keyvalue_- the value- See Also:
-
getAttribute
Gets the attribute at the specified key.- Specified by:
getAttributein 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:
removeAttributein 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:
setLocalein 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:
getLocalein 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:
setTimeZonein 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:
getTimeZonein 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.