com.softwareag.centrasite.appl.framework.types.impl
Class TypeManagerImpl

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.types.impl.TypeManagerImpl
All Implemented Interfaces:
TypeManager

public class TypeManagerImpl
extends java.lang.Object
implements TypeManager


Field Summary
 
Fields inherited from interface com.softwareag.centrasite.appl.framework.types.TypeManager
INO_DAV_PATH
 
Constructor Summary
TypeManagerImpl(javax.xml.registry.Connection connection, java.util.Locale locale)
          Creates a TypeManager by using provided Connection and Locale.
 
Method Summary
 AssociationType createAssociationType(java.lang.String value, java.lang.String name, java.lang.String forwardLabel, java.lang.String backwardLabel, java.util.Locale locale)
          Create a new AssociationType.
 ClassificationAttributeDescription createClassificationAttribute(java.lang.String name, java.lang.String description, java.lang.String taxonomy)
          Creates classification attribute metadata with the provided name, description and taxonomy.
 FileAttributeDescription createFileAttribute(java.lang.String name, java.lang.String description)
          Creates file attribute metadata with the provided name, description and dataType.
 Profile createProfile(java.lang.String name)
          Creates profile with the provided name.
 RelationshipAttributeDescription createRelationshipAttribute(java.lang.String name, java.lang.String description, java.lang.String associationType, java.util.Collection<java.lang.String> targetObjectTypes)
          Creates relationship attribute metadata with the provided name, description, association type and target object types.
 RelationshipAttributeDescription createRelationshipAttribute(java.lang.String name, java.lang.String description, java.lang.String associationType, java.lang.String... targetObjectTypes)
          Creates relationship attribute metadata with the provided name, description, association type and target object type or types.
 SlotAttributeDescription createSlotAttribute(java.lang.String name, java.lang.String description, java.lang.String dataType)
          Creates slot attribute metadata with the provided name, description and dataType.
 TypeDescription createType(java.lang.String displayName, java.lang.String description, java.lang.String name, java.lang.String nameSpace)
          Creates an object type using the provided parameters.
 void deleteAsssociationType(AssociationType at)
          Delete the given AssociationType.
 void deleteProfile(Profile profile)
          Deletes the given profile from the registry.
 void deleteType(TypeDescription typeDesc)
          Deletes the given object type.
 java.util.Collection<AssociationType> getAllAssociationTypes()
          Get all available AssociationTypes.
 java.util.Collection<TypeDescription> getAllTypes()
          Retrieves all object types from the registry.
 AssociationType getAssociationType(java.lang.String value)
          Get the AssociationType with the given value.
 java.util.Collection<AssociationType> getAssociationTypeByForwardLabel(java.lang.String label)
          Get the AssociationType with the given forward label.
 AssociationType getAssociationTypeByName(java.lang.String name)
          Get the AssociationType with the given name.
 java.util.List<Profile> getMandatoryProfiles()
          Retrieves the list of mandatory profiles (Permissions, Object-Specific properties etc.)
 Profile getProfile(java.lang.String key)
          Retrieves the profile with the given key.
 TypeDescription getType(java.lang.String name)
          Retrieves the object type which matches the given name.
 void saveAssociationType(AssociationType at)
          Save the given AssociationType.
 void saveProfile(Profile profile)
          Saves the given profile to the registry.
 void saveType(TypeDescription typeDesc)
          Saves the given object type.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeManagerImpl

public TypeManagerImpl(javax.xml.registry.Connection connection,
                       java.util.Locale locale)
                throws CSAppFrameworkException
Creates a TypeManager by using provided Connection and Locale.

Parameters:
connection -
locale -
Throws:
CSAppFrameworkException
Method Detail

createType

public TypeDescription createType(java.lang.String displayName,
                                  java.lang.String description,
                                  java.lang.String name,
                                  java.lang.String nameSpace)
                           throws CSAppFrameworkException
Creates an object type using the provided parameters.

Specified by:
createType in interface TypeManager
Parameters:
displayName - Display name of the new type.
description - Type description.
name - Type name. This is the local part of the fully qualified type name - {uri}local-name.
nameSpace - Name space that this type belongs to.
Returns:
The newly created type description.
Throws:
CSAppFrameworkException

deleteType

public void deleteType(TypeDescription typeDesc)
                throws CSAppFrameworkException
Deletes the given object type.

Specified by:
deleteType in interface TypeManager
Throws:
CSAppFrameworkException

getAllTypes

public java.util.Collection<TypeDescription> getAllTypes()
                                                  throws CSAppFrameworkException
Retrieves all object types from the registry.

Specified by:
getAllTypes in interface TypeManager
Returns:
List of all object types.
Throws:
CSAppFrameworkException

getType

public TypeDescription getType(java.lang.String name)
                        throws CSAppFrameworkException
Retrieves the object type which matches the given name.

Specified by:
getType in interface TypeManager
Parameters:
name - the object type name as {uri}local-name
Returns:
type description
Throws:
CSAppFrameworkException

saveType

public void saveType(TypeDescription typeDesc)
              throws CSAppFrameworkException
Saves the given object type.

Specified by:
saveType in interface TypeManager
Parameters:
typeDesc - The type description to be saved.
Throws:
CSAppFrameworkException

createClassificationAttribute

public ClassificationAttributeDescription createClassificationAttribute(java.lang.String name,
                                                                        java.lang.String description,
                                                                        java.lang.String taxonomy)
                                                                 throws CSAppFrameworkException
Creates classification attribute metadata with the provided name, description and taxonomy. Classification attributes are modeled as classification from the given taxonomy.

Specified by:
createClassificationAttribute in interface TypeManager
taxonomy - Key of the taxonomy that will be used when classifying with this attribute.
Returns:
newly created attribute description
Throws:
CSAppFrameworkException

createFileAttribute

public FileAttributeDescription createFileAttribute(java.lang.String name,
                                                    java.lang.String description)
                                             throws CSAppFrameworkException
Creates file attribute metadata with the provided name, description and dataType. File attributes are modeled as external links.

Specified by:
createFileAttribute in interface TypeManager
Returns:
newly created attribute description
Throws:
CSAppFrameworkException

createSlotAttribute

public SlotAttributeDescription createSlotAttribute(java.lang.String name,
                                                    java.lang.String description,
                                                    java.lang.String dataType)
                                             throws CSAppFrameworkException
Creates slot attribute metadata with the provided name, description and dataType.

Specified by:
createSlotAttribute in interface TypeManager
dataType - i.e. xs:date, xs:duration
Returns:
newly created attribute description
Throws:
CSAppFrameworkException

createProfile

public Profile createProfile(java.lang.String name)
                      throws CSAppFrameworkException
Creates profile with the provided name.

Specified by:
createProfile in interface TypeManager
Parameters:
name - profile name
Returns:
newly create profile object
Throws:
CSAppFrameworkException

deleteProfile

public void deleteProfile(Profile profile)
                   throws CSAppFrameworkException
Deletes the given profile from the registry.

Specified by:
deleteProfile in interface TypeManager
Throws:
CSAppFrameworkException

saveProfile

public void saveProfile(Profile profile)
                 throws CSAppFrameworkException
Saves the given profile to the registry.

Specified by:
saveProfile in interface TypeManager
Throws:
CSAppFrameworkException

getProfile

public Profile getProfile(java.lang.String key)
                   throws CSAppFrameworkException
Retrieves the profile with the given key.

Specified by:
getProfile in interface TypeManager
Returns:
profile
Throws:
CSAppFrameworkException

getMandatoryProfiles

public java.util.List<Profile> getMandatoryProfiles()
                                             throws CSAppFrameworkException
Description copied from interface: TypeManager
Retrieves the list of mandatory profiles (Permissions, Object-Specific properties etc.)

Specified by:
getMandatoryProfiles in interface TypeManager
Returns:
list
Throws:
CSAppFrameworkException

createRelationshipAttribute

public RelationshipAttributeDescription createRelationshipAttribute(java.lang.String name,
                                                                    java.lang.String description,
                                                                    java.lang.String associationType,
                                                                    java.lang.String... targetObjectTypes)
                                                             throws CSAppFrameworkException
Description copied from interface: TypeManager
Creates relationship attribute metadata with the provided name, description, association type and target object type or types. Relationship attributes are modeled as association of the given type. The targets of the association are enforced to be of the given types.

Specified by:
createRelationshipAttribute in interface TypeManager
associationType - Association type that will be used when associating with this attribute. This is the path to the association type concept.
targetObjectTypes - Keys of the object types to be used for the targets of the relationship.
Returns:
newly created attribute description
Throws:
CSAppFrameworkException

createRelationshipAttribute

public RelationshipAttributeDescription createRelationshipAttribute(java.lang.String name,
                                                                    java.lang.String description,
                                                                    java.lang.String associationType,
                                                                    java.util.Collection<java.lang.String> targetObjectTypes)
                                                             throws CSAppFrameworkException
Description copied from interface: TypeManager
Creates relationship attribute metadata with the provided name, description, association type and target object types. Relationship attributes are modeled as association of the given type. The target of the association is enforced to be of the given types.

Specified by:
createRelationshipAttribute in interface TypeManager
associationType - Association type that will be used when associating with this attribute. This is the path to the association type concept. The path has the following structure: "/uddi:key/ConceptName".
targetObjectTypes - Collection of keys of the object types to be used for the targets of the relationship.
Returns:
newly created attribute description
Throws:
CSAppFrameworkException

createAssociationType

public AssociationType createAssociationType(java.lang.String value,
                                             java.lang.String name,
                                             java.lang.String forwardLabel,
                                             java.lang.String backwardLabel,
                                             java.util.Locale locale)
                                      throws CSAppFrameworkException
Description copied from interface: TypeManager
Create a new AssociationType.

Specified by:
createAssociationType in interface TypeManager
Parameters:
value - the value. Must not be null.
name - the name. If null, the name will be equal to the value.
forwardLabel - the forward label. Must not be null.
backwardLabel - the backward label. May be null.
locale - the locale for the name and the labels. If null, the locale of the underlying JAXR connection will be used.
Returns:
the new AssociationType
Throws:
CSAppFrameworkException
See Also:
TypeManager.createAssociationType(String, String, String, String, Locale)

saveAssociationType

public void saveAssociationType(AssociationType at)
                         throws CSAppFrameworkException
Description copied from interface: TypeManager
Save the given AssociationType.

Specified by:
saveAssociationType in interface TypeManager
Parameters:
at - the AssociationType to be saved
Throws:
CSAppFrameworkException
See Also:
TypeManager.saveAssociationType(AssociationType)

deleteAsssociationType

public void deleteAsssociationType(AssociationType at)
                            throws CSAppFrameworkException
Description copied from interface: TypeManager
Delete the given AssociationType.

Specified by:
deleteAsssociationType in interface TypeManager
Parameters:
at - the AssociationType to be deleted
Throws:
CSAppFrameworkException
See Also:
TypeManager.deleteAsssociationType(AssociationType)

getAssociationType

public AssociationType getAssociationType(java.lang.String value)
                                   throws CSAppFrameworkException
Description copied from interface: TypeManager
Get the AssociationType with the given value.

Specified by:
getAssociationType in interface TypeManager
Parameters:
value - the value of the desired AssociationType
Returns:
the AssociationType. null if not found.
Throws:
CSAppFrameworkException
See Also:
TypeManager.getAssociationType(String)

getAssociationTypeByName

public AssociationType getAssociationTypeByName(java.lang.String name)
                                         throws CSAppFrameworkException
Description copied from interface: TypeManager
Get the AssociationType with the given name. All names regardless of the locale will be searched.

Specified by:
getAssociationTypeByName in interface TypeManager
Parameters:
name - the name of the desired AssociationType
Returns:
the AssociationType. null if not found.
Throws:
CSAppFrameworkException
See Also:
TypeManager.getAssociationTypeByName(String)

getAssociationTypeByForwardLabel

public java.util.Collection<AssociationType> getAssociationTypeByForwardLabel(java.lang.String label)
                                                                       throws CSAppFrameworkException
Description copied from interface: TypeManager
Get the AssociationType with the given forward label. All forward labels regardless of the locale will be searched.

Specified by:
getAssociationTypeByForwardLabel in interface TypeManager
Parameters:
label - the forward label
Returns:
the collection of AssociationTypes. Maybe empty but not null.
Throws:
CSAppFrameworkException
See Also:
TypeManager.getAssociationTypeByForwardLabel(String)

getAllAssociationTypes

public java.util.Collection<AssociationType> getAllAssociationTypes()
                                                             throws CSAppFrameworkException
Description copied from interface: TypeManager
Get all available AssociationTypes.

Specified by:
getAllAssociationTypes in interface TypeManager
Returns:
the collection of AssociationTypes. Maybe empty but not null.
Throws:
CSAppFrameworkException
See Also:
TypeManager.getAllAssociationTypes()