public class IOTypeManager extends AbstractNurseryService implements TypeManager
GenericService.StartCommand, GenericService.StopCommand
CLASS_VERSION
mLogger, state
Constructor and Description |
---|
IOTypeManager()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
createType(Type.Category category,
String value)
Deprecated.
Creates a new type.
|
Type |
getType(Publication pub,
Type.Category category,
int id)
Deprecated.
Looks for a type in a category with a specific id
that is allowed in the specified publication.
|
Type |
getType(Publication pub,
Type.Category category,
String name)
Deprecated.
Looks for a type in a category with a specific name
that is allowed in the specified publication.
|
Type |
getType(Publication pub,
Type type)
Deprecated.
Looks up a specified
Type that is allowed in the
specified publication. |
Type |
getType(Type.Category category,
int id)
Deprecated.
Looks for a type in a category with a specific id.
|
Type |
getType(Type.Category category,
String name)
Deprecated.
Looks for a type in a category with a specific name.
|
Type |
getType(Type type)
Deprecated.
Retrieves the specified Type.
|
Type[] |
getTypes(Publication pub,
Type.Category category)
Deprecated.
Retrieves all
Type objects of the requested category that
is allowed in the specified publication. |
Type[] |
getTypes(Type.Category category)
Deprecated.
Retrieves all possible Type objects of the requested
category.
|
void |
resetType(Type.Category category)
Deprecated.
Removes this type from the internal cache.
|
protected void |
startService()
Deprecated.
Is called by
AbstractNurseryService.doStartService() when the NurseryService is being started. |
protected void |
stopService()
Deprecated.
Is called by
AbstractNurseryService.doStopService() when the service is being shut down. |
doStartService, doStopService, stopIdleService
assertServiceRunning, getServiceDescription, getServiceMessage, getServiceState, isServiceEnabled, isServiceFailed, isServiceIdle, isServiceRunning, isServiceShutdownFailed, isServiceStopped, setServiceDescription, setServiceEnabled, start, stop, validateIsTrue, validateNotNull
protected void startService() throws Exception
AbstractNurseryService
Is called by AbstractNurseryService.doStartService()
when the NurseryService
is being started. Exceptions thrown by this
method are logged by AbstractNurseryService.doStartService()
.
Subclasses must implement this method to bootstrap the service.
startService
in class AbstractNurseryService
Exception
- when something goes wrong during startup. GenericService.isServiceRunning()
will return false
and GenericService.isServiceFailed()
will return true
.IllegalArgumentException
- when the configuration of the service
is invalid. GenericService.isServiceRunning()
will return false
and GenericService.isServiceFailed()
will return true
.IllegalStateException
- when this service is in the wrong state for startup. Used to signal to AbstractNurseryService.doStartService()
that it is OK to try to starting
this service
later. GenericService.isServiceRunning()
returns false
and GenericService.isServiceIdle()
returns true
.AbstractNurseryService.doStartService()
protected void stopService() throws Exception
AbstractNurseryService
Is called by AbstractNurseryService.doStopService()
when the service
is being shut down. Exceptions thrown by this
method are logged by AbstractNurseryService.doStopService()
.
Subclasses must implement this method to shut down the service.
stopService
in class AbstractNurseryService
IllegalStateException
- when this service is in the wrong state for shutdown. Used to signal to AbstractNurseryService.doStopService()
that
it is OK to try stopping this service
later. GenericService.isServiceRunning()
returns true
.Exception
- when something goes during shutdown. GenericService.isServiceRunning()
returns false
and
GenericService.isServiceShutdownFailed()
returns true
.AbstractNurseryService.doStopService()
public Type[] getTypes(Type.Category category)
TypeManager
getTypes
in interface TypeManager
category
- The category of Type objects to getType
,
Type.Category
public void createType(Type.Category category, String value) throws PersistentStoreException
TypeManager
createType
in interface TypeManager
category
- the category of Type
object to createvalue
- the value of the Type
object to createPersistentStoreException
- if an error occurs in the persistence layerType
,
Type.Category
public Type getType(Type type) throws PersistentStoreException
TypeManager
getType
in interface TypeManager
type
- The type to look for.PersistentStoreException
- if an error occurs in the persistence layerType
,
Type.Category
public Type getType(Type.Category category, int id) throws PersistentStoreException
TypeManager
getType
in interface TypeManager
category
- the category to search.id
- the id to look for.PersistentStoreException
- if an error occurs in the persistence layerType
,
Type.Category
public Type getType(Type.Category category, String name) throws PersistentStoreException
TypeManager
getType
in interface TypeManager
category
- the category to search.name
- the name to look for.PersistentStoreException
- if an error occurs in the persistence layerType
,
Type.Category
public Type[] getTypes(Publication pub, Type.Category category) throws PersistentStoreException
TypeManager
Type
objects of the requested category that
is allowed in the specified publication.getTypes
in interface TypeManager
pub
- the publicationcategory
- the category of Type
objects to getPersistentStoreException
- if an error occurs in the persistence layerType
,
Type.Category
public Type getType(Publication pub, Type type) throws PersistentStoreException
TypeManager
Type
that is allowed in the
specified publication.
If the type parameter has a name, the returned value will be the Type
with that name. Otherwise, if it has an id, the method will search for
a type with that id. If neither name nor id is specified, null is
returned.getType
in interface TypeManager
pub
- the publicationtype
- the type to look for.PersistentStoreException
- if an error occurs in the persistence layerType
,
Type.Category
public Type getType(Publication pub, Type.Category category, int id) throws PersistentStoreException
TypeManager
getType
in interface TypeManager
pub
- the publicationcategory
- the category to search.id
- the id to look for.PersistentStoreException
- if an error occurs in the persistence layerType
,
Type.Category
public Type getType(Publication pub, Type.Category category, String name) throws PersistentStoreException
TypeManager
getType
in interface TypeManager
pub
- the publicationcategory
- the category to search.name
- the name to look for.PersistentStoreException
- if an error occurs in the persistence layerType
,
Type.Category
public void resetType(Type.Category category)
TypeManager
resetType
in interface TypeManager
category
- the type to be flushed from the internal cacheType
,
Type.Category
© 1998- 2018 Stibo DX