Package org.imixs.workflow.office.config
Class ConfigService
java.lang.Object
org.imixs.workflow.office.config.ConfigService
@DeclareRoles({"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"})
@RolesAllowed({"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"})
public class ConfigService
extends Object
The Marty Config Service can be used to store and access configuration values
stored in a configuration entity (type='CONFIGURATION).
The ConfigService EJB provides access to named Config Entities stored in the
database. A configuration Entity is identified by its name (property
txtName). So different configuration Entities can be managed in one
application.
The ConfigService ejb is implemented as a sigelton and uses an internal cache
to cache config entities.
- Author:
- rsoika
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.imixs.workflow.ItemCollectioncreateConfiguration(String name) creates a new configuration object for a specified namevoiddeleteConfiguration(org.imixs.workflow.ItemCollection aconfig) This method deletes an existing Configuration.List<org.imixs.workflow.ItemCollection>Returns a list of all configuration entities.org.imixs.workflow.ItemCollectionloadConfiguration(String name) This method returns a config ItemCollection for a specified name.org.imixs.workflow.ItemCollectionloadConfiguration(String name, boolean discardCache) This method returns a config ItemCollection for a specified name.org.imixs.workflow.ItemCollectionsave(org.imixs.workflow.ItemCollection configItemCollection) save the configuration entity
-
Constructor Details
-
ConfigService
public ConfigService()
-
-
Method Details
-
createConfiguration
creates a new configuration object for a specified name- Returns:
- Throws:
Exception
-
deleteConfiguration
public void deleteConfiguration(org.imixs.workflow.ItemCollection aconfig) throws org.imixs.workflow.exceptions.AccessDeniedException This method deletes an existing Configuration.- Parameters:
aconfig-- Throws:
org.imixs.workflow.exceptions.AccessDeniedException
-
loadConfiguration
This method returns a config ItemCollection for a specified name. If no configuration is found for this name the Method creates an empty configuration object. The config entity is cached internally and read from the cache- Parameters:
name- in attribute txtname
-
loadConfiguration
This method returns a config ItemCollection for a specified name. If no configuration is found for this name the Method creates an empty configuration object. The config entity is cached internally. The method uses JPQL instead of lucene index- Parameters:
name- in attribute txtnamediscardCache- - indicates if the internal cache should be discarded.- See Also:
-
#172
-
save
public org.imixs.workflow.ItemCollection save(org.imixs.workflow.ItemCollection configItemCollection) throws org.imixs.workflow.exceptions.AccessDeniedException save the configuration entity- Returns:
- Throws:
org.imixs.workflow.exceptions.AccessDeniedException
-
findAllConfigurations
Returns a list of all configuration entities. The method uses JQPL staements instead of lucene index.- Returns:
- See Also:
-
#172
-