org.springframework.extensions.surf.types
Class ComponentImpl

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

public class ComponentImpl
extends AbstractModelObject
implements Component

Default component 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.Component
PROP_CHROME, PROP_COMPONENT_TYPE_ID, PROP_GUID, PROP_REGION_ID, PROP_SCOPE, PROP_SOURCE_ID, PROP_URL, 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
ComponentImpl(String id, ModelPersisterInfo key, org.dom4j.Document document)
          Instantiates a new component for a given XML document.
 
Method Summary
 String getChrome()
          Gets the chrome.
 ComponentType getComponentType(RequestContext context)
          Gets the component type.
 String getComponentTypeId()
          Gets the component type id.
 String getGUID()
          Gets the GUID.
 String getRegionId()
          Gets the region id.
 String getScope()
          Gets the scope.
 String getSourceId()
          Gets the source id.
 Object getSourceObject(RequestContext context)
          Gets the source object.
 String getTypeId()
          Returns the type id of the model object.
 String getURL()
          Gets the URL.
protected  void regenerateId()
          Regenerate the ID for this component
 void setChrome(String chrome)
          Sets the chrome.
 void setComponentTypeId(String componentTypeId)
          Sets the component type id.
 void setGUID(String guid)
          Sets the GUID.
 void setId(String id)
          Allows for reassignment of the id of the object
 void setRegionId(String regionId)
          Sets the region id.
 void setScope(String scope)
          Sets the scope.
 void setSourceId(String sourceId)
          Sets the source id.
 void setURL(String url)
          Sets the URL.
 
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, 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

ComponentImpl

public ComponentImpl(String id,
                     ModelPersisterInfo key,
                     org.dom4j.Document document)
Instantiates a new component for a 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

getRegionId

public String getRegionId()
Description copied from interface: Component
Gets the region id.

Specified by:
getRegionId in interface Component
Returns:
the region id

setRegionId

public void setRegionId(String regionId)
Description copied from interface: Component
Sets the region id.

Specified by:
setRegionId in interface Component
Parameters:
regionId - the new region id

getSourceId

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

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

setSourceId

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

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

getScope

public String getScope()
Description copied from interface: Component
Gets the scope.

Specified by:
getScope in interface Component
Returns:
the scope

setScope

public void setScope(String scope)
Description copied from interface: Component
Sets the scope.

Specified by:
setScope in interface Component
Parameters:
scope - the new scope

getComponentTypeId

public String getComponentTypeId()
Description copied from interface: Component
Gets the component type id.

Specified by:
getComponentTypeId in interface Component
Returns:
the component type id

setComponentTypeId

public void setComponentTypeId(String componentTypeId)
Description copied from interface: Component
Sets the component type id.

Specified by:
setComponentTypeId in interface Component
Parameters:
componentTypeId - the new component type id

getChrome

public String getChrome()
Description copied from interface: Component
Gets the chrome.

Specified by:
getChrome in interface Component
Returns:
the chrome

setChrome

public void setChrome(String chrome)
Description copied from interface: Component
Sets the chrome.

Specified by:
setChrome in interface Component
Parameters:
chrome - the new chrome

getURL

public String getURL()
Description copied from interface: Component
Gets the URL.

Specified by:
getURL in interface Component
Returns:
the URL

setURL

public void setURL(String url)
Description copied from interface: Component
Sets the URL.

Specified by:
setURL in interface Component
Parameters:
url - the new URL

getGUID

public String getGUID()
Description copied from interface: Component
Gets the GUID.

Specified by:
getGUID in interface Component
Returns:
the GUID

setGUID

public void setGUID(String guid)
Description copied from interface: Component
Sets the GUID.

Specified by:
setGUID in interface Component
Parameters:
guid - the new GUID

getSourceObject

public Object getSourceObject(RequestContext context)
Description copied from interface: Component
Gets the source object.

Specified by:
getSourceObject in interface Component
Parameters:
context - request context
Returns:
the object

getComponentType

public ComponentType getComponentType(RequestContext context)
Description copied from interface: Component
Gets the component type.

Specified by:
getComponentType in interface Component
Parameters:
context - the context
Returns:
the component type

regenerateId

protected void regenerateId()
Regenerate the ID for this component


setId

public void setId(String id)
Description copied from class: AbstractModelObject
Allows for reassignment of the id of the object

Overrides:
setId in class AbstractModelObject


Copyright © 2009 SpringSource, Inc. All Rights Reserved.