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

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

public class TypeDescriptionImpl
extends java.lang.Object
implements TypeDescription


Constructor Summary
TypeDescriptionImpl(com.centrasite.jaxr.type.CentraSiteTypeDescription csTypeDesc, javax.xml.registry.Connection connection, java.util.Locale locale)
          Creates a TypeDescription using the provided Connection, Locale and CentraSiteTypeDescription
 
Method Summary
 void addAttribute(AttributeDescription attribute)
          Adds the given attribute metadata to the given object type.
 void addMandatoryProfiles()
          Adds the mandatory for the CentraSite UI profiles to this type.
 void addProfile(Profile profile)
          Adds the given profile to the object type.
 AttributeDescription getAttributeByName(java.lang.String name)
          Gets attributes list assigned to the object type.
 java.util.Collection<AttributeDescription> getAttributes()
          Gets attributes list assigned to the object type.
 java.lang.String getConceptKey()
          Get associated concept key.
 com.centrasite.jaxr.type.CentraSiteTypeDescription getCsTypeDesc()
          Returns the CentraSiteTypeDescription object associated with this TypeDescription
 java.lang.String getDescription()
          Get the type description.
 java.lang.String getDisplayName()
          Get the type's display name.
 java.lang.String getIconUrl()
          Get the link to the type icon.
 java.lang.String getLargeIconUrl()
          Get the url to the LargeTypeIcon.
 java.lang.String getLocalPart()
          Derive local part from complete name.
 java.lang.String getName()
          Get the type name.
 java.lang.String getNamespaceUri()
          Derive namespace from complete name.
 Profile getProfile(java.lang.String name)
          Gets a profile of an object type for a given name.
 java.util.Collection<Profile> getProfiles()
          Gets the profiles list of an object type.
 boolean isExtensible()
          Deprecated.  
 void removeAttribute(AttributeDescription attribute)
          Removes the selected attribute from the object type
 void removeProfile(Profile profile)
          Removes the given profile from the object type definition.
 void setCsTypeDesc(com.centrasite.jaxr.type.CentraSiteTypeDescription csTypeDesc)
          Sets the CentraSiteTypeDescription object associated with this TypeDescription
 void setDescription(java.lang.String description)
          Set the type description.
 void setDisplayName(java.lang.String name)
          Set the type's display name.
 void setExtensible(boolean extensible)
          Deprecated.  
 void setIconInputStream(java.io.InputStream iconInputStream)
          Set the input stream representing the type icon.
 void setIconMediaType(java.lang.String iconMediype)
          Set the media type of the type icon.
 void setIconUrl(java.lang.String iconUrl)
          Set the link to the type icon.
 void setLargeIconInputStream(java.io.InputStream largeIconInputStream)
          Set the input stream representing the large type icon.
 void setLargeIconMediaType(java.lang.String largeIconMediype)
          Set the media type of the large type icon.
 void setLargeIconUrl(java.lang.String largeIconUrl)
          Set the url to the LargeTypeIcon.
 void setLocalPart(java.lang.String part)
          Set local part in complete name.
 void setName(java.lang.String name)
          Set the type name.
 void setNamespaceUri(java.lang.String namespaceUri)
          Set namespace in complete name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeDescriptionImpl

public TypeDescriptionImpl(com.centrasite.jaxr.type.CentraSiteTypeDescription csTypeDesc,
                           javax.xml.registry.Connection connection,
                           java.util.Locale locale)
                    throws CSAppFrameworkException
Creates a TypeDescription using the provided Connection, Locale and CentraSiteTypeDescription

Parameters:
csTypeDesc -
connection -
locale -
Throws:
CSAppFrameworkException
Method Detail

getCsTypeDesc

public com.centrasite.jaxr.type.CentraSiteTypeDescription getCsTypeDesc()
Returns the CentraSiteTypeDescription object associated with this TypeDescription


setCsTypeDesc

public void setCsTypeDesc(com.centrasite.jaxr.type.CentraSiteTypeDescription csTypeDesc)
Sets the CentraSiteTypeDescription object associated with this TypeDescription


getConceptKey

public java.lang.String getConceptKey()
                               throws CSAppFrameworkException
Get associated concept key. It can be later mapped to registry bean using the BeanPool.

Specified by:
getConceptKey in interface TypeDescription
Returns:
associated concept key
Throws:
CSAppFrameworkException

getDescription

public java.lang.String getDescription()
Get the type description.

Specified by:
getDescription in interface TypeDescription
Returns:
description of type

getDisplayName

public java.lang.String getDisplayName()
                                throws CSAppFrameworkException
Get the type's display name.

Specified by:
getDisplayName in interface TypeDescription
Returns:
type's display name - defaults to Concept name as obtained by getName().
Throws:
CSAppFrameworkException

getIconUrl

public java.lang.String getIconUrl()
                            throws CSAppFrameworkException
Get the link to the type icon.

Specified by:
getIconUrl in interface TypeDescription
Returns:
url to type icon
Throws:
CSAppFrameworkException

getLargeIconUrl

public java.lang.String getLargeIconUrl()
                                 throws CSAppFrameworkException
Get the url to the LargeTypeIcon.

Specified by:
getLargeIconUrl in interface TypeDescription
Returns:
url to LargeTypeIcon
Throws:
CSAppFrameworkException

getLocalPart

public java.lang.String getLocalPart()
Derive local part from complete name.

Specified by:
getLocalPart in interface TypeDescription
Returns:
local part

getName

public java.lang.String getName()
Get the type name.

Specified by:
getName in interface TypeDescription
Returns:
name in the form "{uri}local-name".

getNamespaceUri

public java.lang.String getNamespaceUri()
Derive namespace from complete name.

Specified by:
getNamespaceUri in interface TypeDescription
Returns:
namespace

isExtensible

public boolean isExtensible()
Deprecated. 

Checks if arbitrary slots are allowed

Specified by:
isExtensible in interface TypeDescription
Returns:
true if arbitrary slots allowed, false otherwise

setDescription

public void setDescription(java.lang.String description)
Set the type description.

Specified by:
setDescription in interface TypeDescription
Parameters:
description - description of type

setDisplayName

public void setDisplayName(java.lang.String name)
                    throws CSAppFrameworkException
Set the type's display name.

Specified by:
setDisplayName in interface TypeDescription
Parameters:
name - name
Throws:
CSAppFrameworkException

setExtensible

public void setExtensible(boolean extensible)
Deprecated. 

Sets if arbitrary slots are allowed.

Specified by:
setExtensible in interface TypeDescription
Parameters:
extensible - true if arbitrary slots allowed, false otherwise

setIconInputStream

public void setIconInputStream(java.io.InputStream iconInputStream)
                        throws CSAppFrameworkException
Set the input stream representing the type icon.

Specified by:
setIconInputStream in interface TypeDescription
Parameters:
iconInputStream - the input stream representing the type icon.
Throws:
CSAppFrameworkException

setIconMediaType

public void setIconMediaType(java.lang.String iconMediype)
Set the media type of the type icon.

Specified by:
setIconMediaType in interface TypeDescription
Parameters:
iconMediype - the media type of the type icon.

setIconUrl

public void setIconUrl(java.lang.String iconUrl)
                throws CSAppFrameworkException
Set the link to the type icon.

Specified by:
setIconUrl in interface TypeDescription
Parameters:
iconUrl - url to the type icon
Throws:
CSAppFrameworkException

setLargeIconInputStream

public void setLargeIconInputStream(java.io.InputStream largeIconInputStream)
                             throws CSAppFrameworkException
Set the input stream representing the large type icon.

Specified by:
setLargeIconInputStream in interface TypeDescription
Parameters:
largeIconInputStream - the input stream representing the large type icon.
Throws:
CSAppFrameworkException

setLargeIconMediaType

public void setLargeIconMediaType(java.lang.String largeIconMediype)
Set the media type of the large type icon.

Specified by:
setLargeIconMediaType in interface TypeDescription
Parameters:
largeIconMediype - the media type of the large type icon.

setLargeIconUrl

public void setLargeIconUrl(java.lang.String largeIconUrl)
                     throws CSAppFrameworkException
Set the url to the LargeTypeIcon.

Specified by:
setLargeIconUrl in interface TypeDescription
Parameters:
largeIconUrl - url to LargeTypeIcon
Throws:
CSAppFrameworkException

setLocalPart

public void setLocalPart(java.lang.String part)
Set local part in complete name.

Specified by:
setLocalPart in interface TypeDescription
Parameters:
part - local part

setName

public void setName(java.lang.String name)
             throws CSAppFrameworkException
Set the type name. Checks uniqueness of type name.

Specified by:
setName in interface TypeDescription
Parameters:
name - name in the form "{uri}local-name".
Throws:
CSAppFrameworkException

setNamespaceUri

public void setNamespaceUri(java.lang.String namespaceUri)
Set namespace in complete name.

Specified by:
setNamespaceUri in interface TypeDescription
Parameters:
namespaceUri - namespace URI

addAttribute

public void addAttribute(AttributeDescription attribute)
                  throws CSAppFrameworkException
Adds the given attribute metadata to the given object type.

Specified by:
addAttribute in interface TypeDescription
Throws:
CSAppFrameworkException

addProfile

public void addProfile(Profile profile)
                throws CSAppFrameworkException
Adds the given profile to the object type.

Specified by:
addProfile in interface TypeDescription
Throws:
CSAppFrameworkException

getProfiles

public java.util.Collection<Profile> getProfiles()
                                          throws CSAppFrameworkException
Gets the profiles list of an object type.

Specified by:
getProfiles in interface TypeDescription
Returns:
type profiles
Throws:
CSAppFrameworkException

getProfile

public Profile getProfile(java.lang.String name)
                   throws CSAppFrameworkException
Gets a profile of an object type for a given name.

Specified by:
getProfile in interface TypeDescription
Returns:
type profile
Throws:
CSAppFrameworkException

getAttributes

public java.util.Collection<AttributeDescription> getAttributes()
                                                         throws CSAppFrameworkException
Gets attributes list assigned to the object type.

Specified by:
getAttributes in interface TypeDescription
Returns:
type attributes
Throws:
CSAppFrameworkException

removeAttribute

public void removeAttribute(AttributeDescription attribute)
                     throws CSAppFrameworkException
Removes the selected attribute from the object type

Specified by:
removeAttribute in interface TypeDescription
Throws:
CSAppFrameworkException

removeProfile

public void removeProfile(Profile profile)
                   throws CSAppFrameworkException
Removes the given profile from the object type definition.

Specified by:
removeProfile in interface TypeDescription
Throws:
CSAppFrameworkException

addMandatoryProfiles

public void addMandatoryProfiles()
                          throws CSAppFrameworkException
Description copied from interface: TypeDescription
Adds the mandatory for the CentraSite UI profiles to this type.

Specified by:
addMandatoryProfiles in interface TypeDescription
Throws:
CSAppFrameworkException
See Also:
TypeManager.getMandatoryProfiles()

getAttributeByName

public AttributeDescription getAttributeByName(java.lang.String name)
                                        throws CSAppFrameworkException
Description copied from interface: TypeDescription
Gets attributes list assigned to the object type.

Specified by:
getAttributeByName in interface TypeDescription
Returns:
type attributes
Throws:
CSAppFrameworkException