org.springframework.extensions.surf.types
Class ContentAssociationImpl

java.lang.Object
  extended by org.springframework.extensions.surf.types.AbstractModelObject
      extended by org.springframework.extensions.surf.types.ContentAssociationImpl
All Implemented Interfaces:
Serializable, ModelObject, ResourceProvider, ContentAssociation

public class ContentAssociationImpl
extends AbstractModelObject
implements ContentAssociation

Default content association implementation

Author:
muzquiano
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.extensions.surf.types.AbstractModelObject
CONTAINER_PROPERTIES, CONTAINER_RESOURCES, customProperties, description, descriptionId, document, id, info, modelProperties, modelVersion, modificationTime, resourceContainer, title, titleId
 
Fields inherited from interface org.springframework.extensions.surf.types.ContentAssociation
PROP_ASSOC_TYPE, PROP_DEST_ID, PROP_FORMAT_ID, PROP_SOURCE_ID, PROP_SOURCE_TYPE, TYPE_ID
 
Fields inherited from interface org.springframework.extensions.surf.ModelObject
PROP_DESCRIPTION, PROP_DESCRIPTION_ID, PROP_ID, PROP_TITLE, PROP_TITLE_ID
 
Constructor Summary
ContentAssociationImpl(String id, ModelPersisterInfo key, org.dom4j.Document document)
          Instantiates a new content association for the given XML document
 
Method Summary
 String getAssociationType()
          Gets the association type.
 String getDestId()
          Gets the dest id.
 String getFormatId()
          Gets the format id.
 ModelObject getObject(RequestContext context)
          Gets the object that is being associated.
 String getSourceId()
          Gets the source id.
 String getSourceType()
          Gets the source type.
 String getTypeId()
          Returns the type id of the model object.
 boolean isPageAssociation()
          Checks if is page association.
 boolean isTemplateAssociation()
          Checks if is template association.
 void setAssociationType(String associationType)
          Sets the association type.
 void setDestId(String destId)
          Sets the dest id.
 void setFormatId(String formatId)
          Sets the format id.
 void setSourceId(String sourceId)
          Sets the source id.
 void setSourceType(String sourceType)
          Sets the source type.
 
Methods inherited from class org.springframework.extensions.surf.types.AbstractModelObject
addResource, addResource, getBooleanProperty, getCustomProperties, getCustomProperty, getDescription, getDescriptionId, getDocument, getId, getKey, getModelProperties, getModelProperty, getModelVersion, getModificationTime, getPersisterId, getProperties, getProperty, getResource, getResourceContainer, getResources, getResourcesMap, getStoragePath, getTitle, getTitleId, isCustomProperty, isModelProperty, isSaved, removeCustomProperty, removeModelProperty, removeProperty, removeResource, setCustomProperty, setDescription, setDescriptionId, setId, setModelProperty, setModificationTime, setProperty, setTitle, setTitleId, toString, touch, toXML, updateResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.extensions.surf.ModelObject
getBooleanProperty, getCustomProperties, getCustomProperty, getDescription, getDescriptionId, getDocument, getId, getKey, getModelProperties, getModelProperty, getModelVersion, getModificationTime, getPersisterId, getProperties, getProperty, getStoragePath, getTitle, getTitleId, isSaved, removeCustomProperty, removeModelProperty, removeProperty, setCustomProperty, setDescription, setDescriptionId, setModelProperty, setProperty, setTitle, setTitleId, touch, toXML
 

Constructor Detail

ContentAssociationImpl

public ContentAssociationImpl(String id,
                              ModelPersisterInfo key,
                              org.dom4j.Document document)
Instantiates a new content association for the given XML document

Parameters:
document - the document
Method Detail

getTypeId

public String getTypeId()
Description copied from interface: ModelObject
Returns the type id of the model object.

Specified by:
getTypeId in interface ModelObject
Specified by:
getTypeId in class AbstractModelObject
Returns:
The type id

getSourceId

public String getSourceId()
Description copied from interface: ContentAssociation
Gets the source id.

Specified by:
getSourceId in interface ContentAssociation
Returns:
the source id

setSourceId

public void setSourceId(String sourceId)
Description copied from interface: ContentAssociation
Sets the source id.

Specified by:
setSourceId in interface ContentAssociation
Parameters:
sourceId - the new source id

getDestId

public String getDestId()
Description copied from interface: ContentAssociation
Gets the dest id.

Specified by:
getDestId in interface ContentAssociation
Returns:
the dest id

setDestId

public void setDestId(String destId)
Description copied from interface: ContentAssociation
Sets the dest id.

Specified by:
setDestId in interface ContentAssociation
Parameters:
destId - the new dest id

getAssociationType

public String getAssociationType()
Description copied from interface: ContentAssociation
Gets the association type.

Specified by:
getAssociationType in interface ContentAssociation
Returns:
the association type

setSourceType

public void setSourceType(String sourceType)
Description copied from interface: ContentAssociation
Sets the source type.

Specified by:
setSourceType in interface ContentAssociation
Parameters:
sourceType - the source type

getSourceType

public String getSourceType()
Description copied from interface: ContentAssociation
Gets the source type.

Specified by:
getSourceType in interface ContentAssociation
Returns:
the source type

setAssociationType

public void setAssociationType(String associationType)
Description copied from interface: ContentAssociation
Sets the association type.

Specified by:
setAssociationType in interface ContentAssociation
Parameters:
associationType - the new association type

getFormatId

public String getFormatId()
Description copied from interface: ContentAssociation
Gets the format id.

Specified by:
getFormatId in interface ContentAssociation
Returns:
the format id

setFormatId

public void setFormatId(String formatId)
Description copied from interface: ContentAssociation
Sets the format id.

Specified by:
setFormatId in interface ContentAssociation
Parameters:
formatId - the new format id

getObject

public ModelObject getObject(RequestContext context)
Description copied from interface: ContentAssociation
Gets the object that is being associated. This is generally a template or a page.

Specified by:
getObject in interface ContentAssociation
Parameters:
context - the context
Returns:
the page

isTemplateAssociation

public boolean isTemplateAssociation()
Description copied from interface: ContentAssociation
Checks if is template association.

Specified by:
isTemplateAssociation in interface ContentAssociation
Returns:
true, if is template association

isPageAssociation

public boolean isPageAssociation()
Checks if is page association.

Specified by:
isPageAssociation in interface ContentAssociation
Returns:
true, if is page association


Copyright © 2009 SpringSource, Inc. All Rights Reserved.