public abstract class AbstractUserElementType extends AbstractElementType<UserIdentity> implements Serviceable
Modifier and Type | Field and Description |
---|---|
protected UserHelper |
_helper
The user helper
|
protected UserManager |
_userManager
The user manager
|
Constructor and Description |
---|
AbstractUserElementType() |
Modifier and Type | Method and Description |
---|---|
protected Object |
_singleValueToJSON(UserIdentity value)
Convert the single value into a JSON object
|
protected void |
_singleValueToSAX(ContentHandler contentHandler,
String tagName,
UserIdentity value,
Locale locale)
Generates SAX events for the given single value
|
UserIdentity |
castValue(String value)
Cast an untyped value (string) to an object of the corresponding type
|
Object |
fromJSONForClient(Object json)
Convert the given client side JSON object to the types value
|
boolean |
isSimple()
Determines if this type is simple or not.
|
UserIdentity |
parseConfiguration(Configuration configuration)
Parses the given configuration to get the typed value
|
void |
service(ServiceManager manager) |
String |
toString(UserIdentity value)
Cast a typed value to a String
|
getManagedClass, getManagedClassArray, isCompatible, valueToJSONForClient, valueToSAX
getId, setPluginInfo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId
setPluginInfo
protected UserHelper _helper
protected UserManager _userManager
public AbstractUserElementType()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public UserIdentity castValue(String value) throws BadItemTypeException
ElementType
castValue
in interface ElementType<UserIdentity>
value
- the value to castBadItemTypeException
- if the String value can't be cast to the typepublic String toString(UserIdentity value)
ElementType
toString
in interface ElementType<UserIdentity>
toString
in class AbstractElementType<UserIdentity>
value
- the value to castprotected void _singleValueToSAX(ContentHandler contentHandler, String tagName, UserIdentity value, Locale locale) throws SAXException
AbstractElementType
_singleValueToSAX
in class AbstractElementType<UserIdentity>
contentHandler
- the ContentHandler
that will receive the SAX eventstagName
- the tag name of the SAX event to generate.value
- the single value to SAXlocale
- The locale to use for localized data. Can be null
to generate SAX events for all existing Locale
s.SAXException
- if an error occurs during the SAX events generationpublic UserIdentity parseConfiguration(Configuration configuration) throws ConfigurationException
ElementType
parseConfiguration
in interface ElementType<UserIdentity>
parseConfiguration
in class AbstractElementType<UserIdentity>
configuration
- the configuration to parseConfigurationException
- if an error occurs while parsing the configurationprotected Object _singleValueToJSON(UserIdentity value)
AbstractElementType
_singleValueToJSON
in class AbstractElementType<UserIdentity>
value
- the value to convertpublic Object fromJSONForClient(Object json)
ElementType
fromJSONForClient
in interface ElementType<UserIdentity>
json
- the JSON object to convertpublic boolean isSimple()
ElementType
isSimple
in interface ElementType<UserIdentity>
true
if the type is simple, false
otherwise