org.chromattic.dataobject
Class DataObjectService

java.lang.Object
  extended by org.chromattic.dataobject.DataObjectService

public class DataObjectService
extends java.lang.Object

The data object service.

Version:
$Revision$
Author:
Julien Viet

Constructor Summary
DataObjectService()
           
 
Method Summary
 java.lang.Class[] generateAllClasses(CompilationSource source, java.lang.String... doPaths)
          Compiles the specified classes and returns an array containing all the classes generated during the compilation.
 java.util.Map<java.lang.String,java.lang.Class<?>> generateClasses(CompilationSource source, java.lang.String... doPaths)
          Compiles the specified classes and returns a map with a data object path as key and the corresponding compiled data object class.
 java.util.Map<java.lang.String,NodeType> generateSchema(CompilationSource source, java.lang.String... doPaths)
          Generates the node types for the specified data object paths.
 java.lang.String generateSchema(NodeTypeFormat format, CompilationSource source, java.lang.String... doPaths)
          Generates the node types for the specified data object paths.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataObjectService

public DataObjectService()
Method Detail

generateSchema

public java.lang.String generateSchema(NodeTypeFormat format,
                                       CompilationSource source,
                                       java.lang.String... doPaths)
                                throws DataObjectException,
                                       java.lang.NullPointerException,
                                       java.lang.IllegalArgumentException
Generates the node types for the specified data object paths. This operation returns the schema source in the specified format.

Parameters:
format - the schema output format
source - the compilation source
doPaths - the data object paths
Returns:
the data object paths
Throws:
DataObjectException - anything that would prevent data object compilation
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if any data object path is null

generateSchema

public java.util.Map<java.lang.String,NodeType> generateSchema(CompilationSource source,
                                                               java.lang.String... doPaths)
                                                        throws DataObjectException,
                                                               java.lang.NullPointerException,
                                                               java.lang.IllegalArgumentException
Generates the node types for the specified data object paths. This operations returns a map with the data object path as keys and the related node type as values.

Parameters:
source - the compilation source
doPaths - the data object paths
Returns:
the data object paths
Throws:
DataObjectException - anything that would prevent data object compilation
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if any data object path is null

generateClasses

public java.util.Map<java.lang.String,java.lang.Class<?>> generateClasses(CompilationSource source,
                                                                          java.lang.String... doPaths)
                                                                   throws DataObjectException,
                                                                          java.lang.NullPointerException,
                                                                          java.lang.IllegalArgumentException
Compiles the specified classes and returns a map with a data object path as key and the corresponding compiled data object class.

Parameters:
source - the compilation source
doPaths - the data object paths
Returns:
the compiled data object classes
Throws:
DataObjectException - anything that would prevent data object compilation
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if any data object path is null

generateAllClasses

public java.lang.Class[] generateAllClasses(CompilationSource source,
                                            java.lang.String... doPaths)
                                     throws DataObjectException,
                                            java.lang.NullPointerException,
                                            java.lang.IllegalArgumentException
Compiles the specified classes and returns an array containing all the classes generated during the compilation. Note that the number of returned class can be greater than the number of provided paths (classes can be generated for specific groovy needs, such as closure).

Parameters:
source - the compilation source
doPaths - the data object paths
Returns:
the compiled data object classes
Throws:
DataObjectException - anything that would prevent data object compilation
java.lang.NullPointerException - if any argument is null
java.lang.IllegalArgumentException - if any data object path is null


Copyright © 2012 eXo Platform SAS. All Rights Reserved.