org.imixs.workflow.jee.ejb
Interface EntityServiceRemote

All Known Implementing Classes:
EntityService

public interface EntityServiceRemote

The EntityService Remote interface from the EntityService statless EJB

Author:
rsoika
See Also:
EntityService

Method Summary
 void addIndex(String stitel, int ityp)
          Adds an EntityIndex to the current list of external properties.
 Collection<org.imixs.workflow.ItemCollection> findAllEntities(String query, int startpos, int count)
          The method returns a collection of ItemCollections.
 Collection<org.imixs.workflow.ItemCollection> findChildEntities(org.imixs.workflow.ItemCollection entity, int startpos, int count)
          The method returns a collection of child ItemCollections.
 org.imixs.workflow.ItemCollection findParentEntity(org.imixs.workflow.ItemCollection entity)
          The method returns the parent ItemCollection to a given ItemCollection.
 String getAccessRoles()
          Returns additional AccessRoles defined for the EJB instance
 String getReadAccessFields()
          Returns additional ReadAccessFields defined for the EJB instance.
 String getWriteAccessFields()
          Returns additional WriteAccessFields defined for the EJB instance.
 org.imixs.workflow.ItemCollection load(String id)
          This method loads an ItemCollection from the Database.
 void remove(org.imixs.workflow.ItemCollection itemcol)
          This method removes an ItemCollection from the database.
 void removeIndex(String stitel)
          Removes an EntityIndex from the current list of external properties.
 org.imixs.workflow.ItemCollection save(org.imixs.workflow.ItemCollection itemcol)
          This Method saves an ItemCollection into a database.
 

Method Detail

getAccessRoles

String getAccessRoles()
Returns additional AccessRoles defined for the EJB instance

Returns:

getReadAccessFields

String getReadAccessFields()
Returns additional ReadAccessFields defined for the EJB instance. Default=$ReadAccess

Returns:

getWriteAccessFields

String getWriteAccessFields()
Returns additional WriteAccessFields defined for the EJB instance. Default=$WriteAccess

Returns:

save

org.imixs.workflow.ItemCollection save(org.imixs.workflow.ItemCollection itemcol)
                                       throws org.imixs.workflow.exceptions.AccessDeniedException,
                                              org.imixs.workflow.exceptions.InvalidWorkitemException
This Method saves an ItemCollection into a database. If the ItemCollection is saved the first time the method generates a uniqueID ('$uniqueid') which can be used to identify the ItemCollection by its ID. If the ItemCollection was saved before the method updates the ItemCollection stored in the database. The Method returns an updated instance of the ItemCollection containing the attributes $modified, $created, and $uniqueid

The method throws an AccessDeniedException if the CallerPrincipal is not allowed to save or update the ItemCollection in the database. The CallerPrincipial should have at least the access Role org.imixs.ACCESSLEVEL.AUTHORACCESS

Parameters:
ItemCollection - to be saved
Returns:
updated ItemCollection
Throws:
org.imixs.workflow.exceptions.AccessDeniedException
org.imixs.workflow.exceptions.InvalidWorkitemException

load

org.imixs.workflow.ItemCollection load(String id)
This method loads an ItemCollection from the Database. The method expects a valid $unqiueID to identify the ItemCollection saved before into the database. The method returns null if no ItemCollection with the corresponding ID exists.

The method checks also if the CallerPrincipal has read access to ItemCollection stored in the database. If not the method returns null. The method dose not throw an AccessDeniedException if the user is not allowed to read the entity to prevent a aggressor with informations about the existence of that specific ItemCollection.

CallerPrincipial should have at least the access Role org.imixs.ACCESSLEVEL.READACCESS

Parameters:
id - the $unqiueid of the ItemCollection to be loaded
Returns:
ItemCollection object or null if the ItemColleciton dose not exist or the CallerPrincipal hat insufficient read access.

remove

void remove(org.imixs.workflow.ItemCollection itemcol)
            throws org.imixs.workflow.exceptions.AccessDeniedException,
                   org.imixs.workflow.exceptions.InvalidWorkitemException
This method removes an ItemCollection from the database. If the CallerPrincipal is not allowed to access the ItemColleciton the method throws an AccessDeniedException.

The CallerPrincipial should have at least the access Role org.imixs.ACCESSLEVEL.AUTHORACCESS

Parameters:
ItemCollection - to be removed
Throws:
Exception
org.imixs.workflow.exceptions.AccessDeniedException
org.imixs.workflow.exceptions.InvalidWorkitemException

addIndex

void addIndex(String stitel,
              int ityp)
              throws Exception
Adds an EntityIndex to the current list of external properties. A EntityIndex defines a Index to a specific Attribute provided by ItemCollections saved to the database. The method throws an AccessDeniedException if the CallerPrinciapal is not in the role org.imixs.ACCESSLEVEL.MANAGERACCESS.

Parameters:
stitel -
ityp - - Type of EntityIndex
Throws:
Exception

removeIndex

void removeIndex(String stitel)
                 throws Exception
Removes an EntityIndex from the current list of external properties. The method throws an AccessDeniedException if the CallerPrinciapal is not in the role org.imixs.ACCESSLEVEL.MANAGERACCESS.

Parameters:
stitel -
Throws:
Exception

findAllEntities

Collection<org.imixs.workflow.ItemCollection> findAllEntities(String query,
                                                              int startpos,
                                                              int count)
The method returns a collection of ItemCollections. The method expects an valid EQL statement. The method returns only ItemCollections which are readable by the CallerPrincipal. With the startpos and count parameters it is possible to read chunks of entities.

Parameters:
query -
startpos -
count -
Returns:

findParentEntity

org.imixs.workflow.ItemCollection findParentEntity(org.imixs.workflow.ItemCollection entity)
The method returns the parent ItemCollection to a given ItemCollection. A parent entity is referenced by an other entity by the property $uniqueidRef which points to a parent entity.

Parameters:
childentity -
Returns:
parent entity

findChildEntities

Collection<org.imixs.workflow.ItemCollection> findChildEntities(org.imixs.workflow.ItemCollection entity,
                                                                int startpos,
                                                                int count)
The method returns a collection of child ItemCollections. A child entity is defined by the property $uniqueidRef which points to a parent entity. The method returns only ItemCollections which are readable by the CallerPrincipal. With the startPos and count parameters it is possible to read chunks of entities.

Parameters:
parententity -
startpos -
count -
Returns:
See Also:
findParentEntity


Copyright © 2006-2011 Imixs Software Solutions GmbH. All Rights Reserved.