com.flexive.shared.interfaces
Interface TypeEngine

All Known Subinterfaces:
TypeEngineLocal

public interface TypeEngine

FxType management

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

Method Summary
 java.lang.String export(long id)
          Export the type with the requested id as XML
 void flatten(long typeId)
          Migrate all assignments of the given type that can be stored in the default flat storage
 void flatten(long typeId, FlattenOptions options)
          Migrate all assignments of the given type that can be stored in the default flat storage
 void flatten(java.lang.String storage, long typeId)
          Migrate all assignments of the given type that can be stored in a flat storage
 void flatten(java.lang.String storage, long typeId, FlattenOptions options)
          Migrate all assignments of the given type that can be stored in a flat storage
 long getInstanceCount(long typeId)
          Get the number of instances of a given type
 FxType importType(java.lang.String typeXML)
          Import a type fromt he given XML.
 void remove(long id)
          Completely remove a FxType and its assignments (exception will be thrown if instances or derived types exist)
 long save(FxTypeEdit type)
          Create a new or update an existing FxType
 void unflatten(long typeId)
          Migrate all assignments of the given type that are stored in a flat storage to the hierarchical storage
 

Method Detail

save

long save(FxTypeEdit type)
          throws FxApplicationException
Create a new or update an existing FxType

Parameters:
type - FxType to create or update
Returns:
id of the type
Throws:
FxApplicationException - on errors

remove

void remove(long id)
            throws FxApplicationException
Completely remove a FxType and its assignments (exception will be thrown if instances or derived types exist)

Parameters:
id - id of the type to remove
Throws:
FxApplicationException - on errors

export

java.lang.String export(long id)
                        throws FxApplicationException
Export the type with the requested id as XML

Parameters:
id - requested type id
Returns:
XML export
Throws:
FxApplicationException - on errors

importType

FxType importType(java.lang.String typeXML)
                  throws FxApplicationException
Import a type fromt he given XML. If the type exists, changes will be applied.

Parameters:
typeXML - the type as xml
Returns:
the imported type
Throws:
FxApplicationException - on errors

getInstanceCount

long getInstanceCount(long typeId)
Get the number of instances of a given type

Parameters:
typeId - requested type
Returns:
number of instances
Since:
3.1

flatten

void flatten(java.lang.String storage,
             long typeId)
             throws FxApplicationException
Migrate all assignments of the given type that can be stored in a flat storage

Parameters:
storage - name of the storage
typeId - id of the type
Throws:
FxApplicationException - on errors
Since:
3.1

flatten

void flatten(java.lang.String storage,
             long typeId,
             FlattenOptions options)
             throws FxApplicationException
Migrate all assignments of the given type that can be stored in a flat storage

Parameters:
storage - name of the storage
typeId - id of the type
options - options to filter the flatten operations
Throws:
FxApplicationException - on errors
Since:
3.2.0

flatten

void flatten(long typeId)
             throws FxApplicationException
Migrate all assignments of the given type that can be stored in the default flat storage

Parameters:
typeId - id of the type
Throws:
FxApplicationException - on errors
Since:
3.1

flatten

void flatten(long typeId,
             FlattenOptions options)
             throws FxApplicationException
Migrate all assignments of the given type that can be stored in the default flat storage

Parameters:
typeId - id of the type
options - options to filter the flatten operations
Throws:
FxApplicationException - on errors
Since:
3.2.0

unflatten

void unflatten(long typeId)
               throws FxApplicationException
Migrate all assignments of the given type that are stored in a flat storage to the hierarchical storage

Parameters:
typeId - id of the type
Throws:
FxApplicationException - on errors
Since:
3.1