org.eclipse.stardust.engine.core.runtime.beans
Class DocumentTypeUtils

java.lang.Object
  extended by org.eclipse.stardust.engine.core.runtime.beans.DocumentTypeUtils

public final class DocumentTypeUtils
extends java.lang.Object


Method Summary
static java.util.List<Data> getDataUsingDocumentType(DeployedModel model, DocumentType documentType)
          Retrieves Document and DocumentList data from the given model which uses the type definition defined by the given DocumentType.
static java.util.List<DocumentType> getDeclaredDocumentTypes(Model model)
          Creates DocumentType objects based on the Document and DocumentList data having a TypeDeclaration assigned in the given model.
static java.util.List<DocumentType> getDeclaredDocumentTypes(Model model, java.util.Map<java.lang.Integer,Model> referenceModels)
          Creates DocumentType objects based on the Document and DocumentList data having a TypeDeclaration assigned in the given model.
static DocumentType getDocumentTypeFromData(Model model, Data data)
          Retrieves the DocumentType used in the specified data.
static java.util.Set<DocumentType> getDocumentTypesFromData(Model model, java.util.List<Data> dataList)
          Retrieves the DocumentTypes used in the specified data.
static java.util.List<Data> getReferencedDocumentData(DeployedModel model)
          Retrieves data which are of type Document or DocumentList and having a Reference to an external TypeDefinition or data which is externally defined itself.
static java.lang.String getUnversionedInfoPath(java.lang.String documentTypeId)
          This folder hosts version unspecific settings for all Document Types of a particular Document Type ID
static java.lang.String getVersionedInfoPath(java.lang.String documentTypeId, java.lang.String schemaLocation)
          This folder hosts version specific settings for a particular Document Type with the specified Document Type Schema Location
static java.lang.String getXsdDocumentName()
          The document name all xsd schemas are stored and retrieved with.
static java.lang.String getXsdDocumentPath(java.lang.String schemaLocation)
           
static java.lang.String getXsdFolderPath(java.lang.String schemaLocation)
           
static DocumentType inferDocumentType(org.eclipse.stardust.engine.api.model.IData data)
          For internal use only.
static DocumentType inferDocumentTypeAndStoreDocument(org.eclipse.stardust.engine.api.model.IData data, Document document)
          For internal use only.
static boolean isDmsDocumentData(java.lang.String dataTypeId)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

inferDocumentType

public static DocumentType inferDocumentType(org.eclipse.stardust.engine.api.model.IData data)
For internal use only.

Parameters:
data -
Returns:

inferDocumentTypeAndStoreDocument

public static DocumentType inferDocumentTypeAndStoreDocument(org.eclipse.stardust.engine.api.model.IData data,
                                                             Document document)
For internal use only.

Parameters:
data -
document -
Returns:
Throws:
org.eclipse.stardust.common.error.InvalidValueException - if a incompatible document type is set on the document.

isDmsDocumentData

public static boolean isDmsDocumentData(java.lang.String dataTypeId)

getDeclaredDocumentTypes

public static java.util.List<DocumentType> getDeclaredDocumentTypes(Model model)
Creates DocumentType objects based on the Document and DocumentList data having a TypeDeclaration assigned in the given model.
It does not resolve the DocumentType of Document or DocumentList data referencing a TypeDeclaration from a external model reference or externally referenced data.

Parameters:
model - The model to search for declared DocumenTypes.
Returns:
A list of DocumentType that are declared within the specified model.
See Also:
getDeclaredDocumentTypes(Model, Map)

getDeclaredDocumentTypes

public static java.util.List<DocumentType> getDeclaredDocumentTypes(Model model,
                                                                    java.util.Map<java.lang.Integer,Model> referenceModels)
Creates DocumentType objects based on the Document and DocumentList data having a TypeDeclaration assigned in the given model.

Parameters:
model - The model to search for declared DocumenTypes.
referenceModels - A map of models by modelOID. It should contain all models which could be referenced by the specified model.
Returns:
A list of DocumentType that are declared within the specified model.

getReferencedDocumentData

public static java.util.List<Data> getReferencedDocumentData(DeployedModel model)
Retrieves data which are of type Document or DocumentList and having a Reference to an external TypeDefinition or data which is externally defined itself.

Parameters:
model - The model to search for data referencing DocumentTypes.
Returns:
A List of data referencing DocumentTypes.

getDataUsingDocumentType

public static java.util.List<Data> getDataUsingDocumentType(DeployedModel model,
                                                            DocumentType documentType)
Retrieves Document and DocumentList data from the given model which uses the type definition defined by the given DocumentType.

Parameters:
model - The model containing the data and type definitions.
documentType - The documentType to retrieve matching data for. If documentType is null data not having a documentType assigned are returned.
Returns:
Data using the specified DocumentType.

getDocumentTypesFromData

public static java.util.Set<DocumentType> getDocumentTypesFromData(Model model,
                                                                   java.util.List<Data> dataList)
Retrieves the DocumentTypes used in the specified data.

Parameters:
model -
dataList -
Returns:

getDocumentTypeFromData

public static DocumentType getDocumentTypeFromData(Model model,
                                                   Data data)
Retrieves the DocumentType used in the specified data.

Parameters:
model -
data -
Returns:

getUnversionedInfoPath

public static java.lang.String getUnversionedInfoPath(java.lang.String documentTypeId)
This folder hosts version unspecific settings for all Document Types of a particular Document Type ID

Parameters:
documentTypeId -
Returns:

getVersionedInfoPath

public static java.lang.String getVersionedInfoPath(java.lang.String documentTypeId,
                                                    java.lang.String schemaLocation)
This folder hosts version specific settings for a particular Document Type with the specified Document Type Schema Location

Parameters:
documentTypeId -
schemaLocation -
Returns:

getXsdDocumentName

public static java.lang.String getXsdDocumentName()
The document name all xsd schemas are stored and retrieved with.

Returns:

getXsdDocumentPath

public static java.lang.String getXsdDocumentPath(java.lang.String schemaLocation)
Parameters:
schemaLocation -
Returns:

getXsdFolderPath

public static java.lang.String getXsdFolderPath(java.lang.String schemaLocation)
Parameters:
schemaLocation -
Returns:


Copyright © 2013 SunGard CSA LLC. All Rights Reserved.