Class 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 Detail

      • ConfigService

        public ConfigService()
    • Method Detail

      • createConfiguration

        public org.imixs.workflow.ItemCollection createConfiguration​(String name)
                                                              throws Exception
        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

        public org.imixs.workflow.ItemCollection loadConfiguration​(String name)
        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

        public org.imixs.workflow.ItemCollection loadConfiguration​(String name,
                                                                   boolean discardCache)
        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 txtname
        discardCache - - 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

        public List<org.imixs.workflow.ItemCollection> findAllConfigurations()
        Returns a list of all configuration entities. The method uses JQPL staements instead of lucene index.
        Returns:
        See Also:
        #172