org.infoglue.cms.controllers.kernel.impl.simple
Class ContentTypeDefinitionController

java.lang.Object
  extended by org.infoglue.cms.controllers.kernel.impl.simple.BaseController
      extended by org.infoglue.cms.controllers.kernel.impl.simple.ContentTypeDefinitionController

public class ContentTypeDefinitionController
extends BaseController

Author:
ss To change this generated comment edit the template variable "typecomment": Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to Window>Preferences>Java>Code Generation.

Field Summary
static java.lang.String ASSET_KEYS
           
static java.lang.String CATEGORY_KEYS
           
 
Constructor Summary
ContentTypeDefinitionController()
           
 
Method Summary
 ContentTypeDefinitionVO create(ContentTypeDefinitionVO contentTypeDefinitionVO)
           
 void delete(ContentTypeDefinitionVO contentTypeDefinitionVO)
           
 java.util.List getAuthorizedContentTypeDefinitionVOList(InfoGluePrincipal infoGluePrincipal)
          This method can be used by actions and use-case-controllers that only need to have simple access to the functionality.
protected  java.util.List getCategoryInfo(org.w3c.dom.NodeList nodes)
          Returns a List of CategoryInfos for the category atributes of the NodeList
 java.util.List getContentTypeAttributes(java.lang.String schemaValue)
          This method returns the attributes in the content type definition for generation.
 ContentTypeDefinition getContentTypeDefinitionWithId(java.lang.Integer contentTypeDefinitionId, org.exolab.castor.jdo.Database db)
           
 ContentTypeDefinition getContentTypeDefinitionWithName(java.lang.String name, org.exolab.castor.jdo.Database db)
          Returns the Content Type Definition with the given name fetched within a given transaction.
 java.util.List getContentTypeDefinitionVOList()
           
 java.util.List getContentTypeDefinitionVOList(org.exolab.castor.jdo.Database db)
           
 java.util.List getContentTypeDefinitionVOList(java.lang.Integer type)
           
 java.util.List getContentTypeDefinitionVOList(java.lang.Integer type, org.exolab.castor.jdo.Database db)
           
 ContentTypeDefinitionVO getContentTypeDefinitionVOWithId(java.lang.Integer contentTypeDefinitionId)
           
 ContentTypeDefinitionVO getContentTypeDefinitionVOWithName(java.lang.String name)
          Returns the Content Type Definition with the given name.
 ContentTypeDefinitionVO getContentTypeDefinitionVOWithName(java.lang.String name, org.exolab.castor.jdo.Database db)
          Returns the Content Type Definition with the given name fetched within a given transaction.
static ContentTypeDefinitionController getController()
          Factory method
 AssetKeyDefinition getDefinedAssetKey(java.lang.String contentTypeDefinitionString, java.lang.String assetKey)
          This method fetches a predefined assetKeys from a xml-string representing a contentTypeDefinition.
 java.util.List getDefinedAssetKeys(java.lang.String contentTypeDefinitionString)
          This method fetches any predefined assetKeys from a xml-string representing a contentTypeDefinition.
 java.util.List getDefinedCategoryKeys(java.lang.String contentTypeDefinitionString)
          This method fetches any predefined categoryKeys from a xml-string representing a contentTypeDefinition.
protected  java.lang.String getElementValue(org.w3c.dom.Element root, java.lang.String tagName)
          Get the CDATA value from the provided elements child tag
protected  org.w3c.dom.NodeList getEnumerationNodeList(java.lang.String contentTypeDefinitionString, java.lang.String keyType)
          Returns a list of xs:enumeration nodes base on the provided key.
protected  java.util.List getEnumValues(org.w3c.dom.NodeList nodes)
          Returns a List of values fro the "value" atribute of the provided NodeList
 boolean getIsAccessApproved(java.lang.Integer contentTypeDefinitionId, InfoGluePrincipal infoGluePrincipal)
          This method returns true if the user should have access to the contentTypeDefinition sent in.
 BaseEntityVO getNewVO()
          This is a method that gives the user back an newly initialized ValueObject for this entity that the controller is handling.
 java.lang.String insertContentTypeAttribute(java.lang.String schemaValue, java.lang.String inputTypeId, java.util.List activatedName)
          This method adds a new content type attribute to the contentTypeDefinition.
 ContentTypeDefinitionVO update(ContentTypeDefinitionVO contentTypeDefinitionVO)
           
 ContentTypeDefinitionVO validateAndUpdateContentType(ContentTypeDefinitionVO contentTypeDefinitionVO)
          This method validates the current content type and updates it to be valid in the future.
 
Methods inherited from class org.infoglue.cms.controllers.kernel.impl.simple.BaseController
beginTransaction, beginTransaction, closeDatabase, commitTransaction, createEntity, createEntity, createQuery, deleteEntity, deleteEntity, deleteEntity, deleteEntity, executeQuery, executeQuery, executeQuery, executeQuery, getAllVOObjects, getAllVOObjects, getAllVOObjects, getAllVOObjects, getLogger, getObjectWithId, getObjectWithId, getObjectWithIdAsReadOnly, getVOWithId, getVOWithId, getVOWithId, getVOWithId, intercept, intercept, rollbackTransaction, toModifiableVOList, toVOList, updateEntity, updateEntity, updateEntity, updateEntity, validateEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASSET_KEYS

public static final java.lang.String ASSET_KEYS
See Also:
Constant Field Values

CATEGORY_KEYS

public static final java.lang.String CATEGORY_KEYS
See Also:
Constant Field Values
Constructor Detail

ContentTypeDefinitionController

public ContentTypeDefinitionController()
Method Detail

getController

public static ContentTypeDefinitionController getController()
Factory method


getContentTypeDefinitionVOWithId

public ContentTypeDefinitionVO getContentTypeDefinitionVOWithId(java.lang.Integer contentTypeDefinitionId)
                                                         throws SystemException,
                                                                Bug
Throws:
SystemException
Bug

getContentTypeDefinitionWithId

public ContentTypeDefinition getContentTypeDefinitionWithId(java.lang.Integer contentTypeDefinitionId,
                                                            org.exolab.castor.jdo.Database db)
                                                     throws SystemException,
                                                            Bug
Throws:
SystemException
Bug

getContentTypeDefinitionVOList

public java.util.List getContentTypeDefinitionVOList()
                                              throws SystemException,
                                                     Bug
Throws:
SystemException
Bug

getContentTypeDefinitionVOList

public java.util.List getContentTypeDefinitionVOList(org.exolab.castor.jdo.Database db)
                                              throws SystemException,
                                                     Bug
Throws:
SystemException
Bug

getAuthorizedContentTypeDefinitionVOList

public java.util.List getAuthorizedContentTypeDefinitionVOList(InfoGluePrincipal infoGluePrincipal)
                                                        throws ConstraintException,
                                                               SystemException,
                                                               Bug
This method can be used by actions and use-case-controllers that only need to have simple access to the functionality. They don't get the transaction-safety but probably just wants to show the info.

Throws:
ConstraintException
SystemException
Bug

getIsAccessApproved

public boolean getIsAccessApproved(java.lang.Integer contentTypeDefinitionId,
                                   InfoGluePrincipal infoGluePrincipal)
                            throws SystemException
This method returns true if the user should have access to the contentTypeDefinition sent in.

Throws:
SystemException

getContentTypeDefinitionVOWithName

public ContentTypeDefinitionVO getContentTypeDefinitionVOWithName(java.lang.String name)
                                                           throws SystemException,
                                                                  Bug
Returns the Content Type Definition with the given name.

Parameters:
name -
Returns:
Throws:
SystemException
Bug

getContentTypeDefinitionWithName

public ContentTypeDefinition getContentTypeDefinitionWithName(java.lang.String name,
                                                              org.exolab.castor.jdo.Database db)
                                                       throws SystemException,
                                                              Bug
Returns the Content Type Definition with the given name fetched within a given transaction.

Parameters:
name -
db -
Returns:
Throws:
SystemException
Bug

getContentTypeDefinitionVOWithName

public ContentTypeDefinitionVO getContentTypeDefinitionVOWithName(java.lang.String name,
                                                                  org.exolab.castor.jdo.Database db)
                                                           throws SystemException,
                                                                  Bug
Returns the Content Type Definition with the given name fetched within a given transaction.

Parameters:
name -
db -
Returns:
Throws:
SystemException
Bug

getContentTypeDefinitionVOList

public java.util.List getContentTypeDefinitionVOList(java.lang.Integer type)
                                              throws SystemException,
                                                     Bug
Throws:
SystemException
Bug

getContentTypeDefinitionVOList

public java.util.List getContentTypeDefinitionVOList(java.lang.Integer type,
                                                     org.exolab.castor.jdo.Database db)
                                              throws SystemException,
                                                     Bug
Throws:
SystemException
Bug

create

public ContentTypeDefinitionVO create(ContentTypeDefinitionVO contentTypeDefinitionVO)
                               throws ConstraintException,
                                      SystemException
Throws:
ConstraintException
SystemException

delete

public void delete(ContentTypeDefinitionVO contentTypeDefinitionVO)
            throws ConstraintException,
                   SystemException
Throws:
ConstraintException
SystemException

update

public ContentTypeDefinitionVO update(ContentTypeDefinitionVO contentTypeDefinitionVO)
                               throws ConstraintException,
                                      SystemException
Throws:
ConstraintException
SystemException

getDefinedAssetKey

public AssetKeyDefinition getDefinedAssetKey(java.lang.String contentTypeDefinitionString,
                                             java.lang.String assetKey)
This method fetches a predefined assetKeys from a xml-string representing a contentTypeDefinition.


getDefinedAssetKeys

public java.util.List getDefinedAssetKeys(java.lang.String contentTypeDefinitionString)
This method fetches any predefined assetKeys from a xml-string representing a contentTypeDefinition.


getDefinedCategoryKeys

public java.util.List getDefinedCategoryKeys(java.lang.String contentTypeDefinitionString)
This method fetches any predefined categoryKeys from a xml-string representing a contentTypeDefinition.


getEnumValues

protected java.util.List getEnumValues(org.w3c.dom.NodeList nodes)
Returns a List of values fro the "value" atribute of the provided NodeList


getCategoryInfo

protected java.util.List getCategoryInfo(org.w3c.dom.NodeList nodes)
Returns a List of CategoryInfos for the category atributes of the NodeList


getEnumerationNodeList

protected org.w3c.dom.NodeList getEnumerationNodeList(java.lang.String contentTypeDefinitionString,
                                                      java.lang.String keyType)
Returns a list of xs:enumeration nodes base on the provided key.

Parameters:
keyType - The key to find enumerations for

getElementValue

protected java.lang.String getElementValue(org.w3c.dom.Element root,
                                           java.lang.String tagName)
Get the CDATA value from the provided elements child tag

Parameters:
root - The root element to find the child tag
tagName - The tag name of the child to get the CDATA value
Returns:
The String CDATA or null if the tag does not exist or no value is set.

getContentTypeAttributes

public java.util.List getContentTypeAttributes(java.lang.String schemaValue)
This method returns the attributes in the content type definition for generation.


insertContentTypeAttribute

public java.lang.String insertContentTypeAttribute(java.lang.String schemaValue,
                                                   java.lang.String inputTypeId,
                                                   java.util.List activatedName)
This method adds a new content type attribute to the contentTypeDefinition. It sets some default values.


validateAndUpdateContentType

public ContentTypeDefinitionVO validateAndUpdateContentType(ContentTypeDefinitionVO contentTypeDefinitionVO)
This method validates the current content type and updates it to be valid in the future.


getNewVO

public BaseEntityVO getNewVO()
This is a method that gives the user back an newly initialized ValueObject for this entity that the controller is handling.

Specified by:
getNewVO in class BaseController


Copyright © 2005 InfoGlue.org All Rights Reserved.