com.flexive.shared.interfaces
Interface MandatorEngine

All Known Subinterfaces:
MandatorEngineLocal

public interface MandatorEngine

Mandator Interface

Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Method Summary
 void activate(long mandatorId)
          Activate a mandator
 void assignMetaData(int mandatorId, long contentId)
          Assign a content instance with metadata for this mandator
 void changeName(long mandatorId, java.lang.String name)
          Updates the name of the specified mandator.
 int create(java.lang.String name, boolean active)
          Create a new mandator
 void deactivate(long mandatorId)
          Deactivate a mandator
 void remove(long mandatorId)
          Remove a mandator.
 void removeMetaData(int mandatorId)
          Remove metadata assigned to the given mandator
 

Method Detail

create

int create(java.lang.String name,
           boolean active)
           throws FxApplicationException
Create a new mandator

Parameters:
name - name to assign
active - active flag
Returns:
id of the new mandator
Throws:
FxApplicationException - TODO
FxCreateException - on errors
FxInvalidParameterException - if the name is invalid
FxEntryExistsException - if a mandator with this name already exists
FxNoAccessException - if the user is not in the role MANDATOR_MANAGEMENT

assignMetaData

void assignMetaData(int mandatorId,
                    long contentId)
                    throws FxApplicationException
Assign a content instance with metadata for this mandator

Parameters:
mandatorId - id of the mandator
contentId - id of the content containing the metadata
Throws:
FxApplicationException - TODO
FxNotFoundException - if either the mandator or the metadata content dont exist
FxNoAccessException - if the user is not in the role MANDATOR_MANAGEMENT
FxUpdateException - on update errors

removeMetaData

void removeMetaData(int mandatorId)
                    throws FxApplicationException
Remove metadata assigned to the given mandator

Parameters:
mandatorId - id of the mandator
Throws:
FxApplicationException - TODO
FxNotFoundException - if the mandator does not exist
FxNoAccessException - if the user is not in the role MANDATOR_MANAGEMENT
FxUpdateException - on update errors

activate

void activate(long mandatorId)
              throws FxApplicationException
Activate a mandator

Parameters:
mandatorId - id of the mandator
Throws:
FxApplicationException - TODO
FxNotFoundException - if the mandator does not exist
FxNoAccessException - if the user is not in the role MANDATOR_MANAGEMENT
FxUpdateException - on update errors

deactivate

void deactivate(long mandatorId)
                throws FxApplicationException
Deactivate a mandator

Parameters:
mandatorId - id of the mandator
Throws:
FxApplicationException - TODO
FxNotFoundException - if the mandator does not exist
FxNoAccessException - if the user is not in the role MANDATOR_MANAGEMENT
FxUpdateException - on update errors

remove

void remove(long mandatorId)
            throws FxApplicationException
Remove a mandator. If the mandator is in use or is referenced this method will fail!

Parameters:
mandatorId - id of the mandator
Throws:
FxApplicationException - TODO
FxEntryInUseException - if the mandator is referenced
FxNotFoundException - if the mandator does not exist
FxNoAccessException - if the user is not in the role MANDATOR_MANAGEMENT
FxRemoveException - on remove errors

changeName

void changeName(long mandatorId,
                java.lang.String name)
                throws FxApplicationException
Updates the name of the specified mandator.

Parameters:
mandatorId - the mandator to change the name for
name - the new name
Throws:
FxApplicationException - TODO