com.logabit.webtools.patchwork
Class PatchworkLayout

java.lang.Object
  extended by com.logabit.webtools.patchwork.PatchworkLayout

public class PatchworkLayout
extends java.lang.Object

Author:
Stephan Niedermeier This class represents a single patchwork layout.

Method Summary
 PatchworkInclude createInclude(java.lang.String name, PatchworkLayout layout, java.lang.String templatePath)
          Factory method to create a new patchwork include.
 PatchworkConfiguration getConfig()
          Returns the configuration object this layout belongs to.
 java.util.Map<java.lang.String,ContentProviderDescriptor> getContentDescriptors()
          Get all local content descriptors, belonging to this layout.
 java.lang.String getDescription()
          Returns the description of this layout.
 java.lang.String getExtendsName()
          Returns the name of the layout this layout extends.
 java.util.Map<java.lang.String,PatchworkInclude> getIncludes()
          Retuns all PatchworkIncludes which're defined within this layout.
 java.lang.String getInfoString()
          Returns a more readable string respresentation of this layout object.
 java.lang.String getName()
          Returns the name of this layout.
 java.util.Map<java.lang.String,java.lang.String> getProperties()
          Returns the properties configured within this layout.
 java.lang.String getTemplatePath()
          Returns the path of the template which belongs to this layout.
 boolean isCallable()
          Returns true if it is allowed to call this layout directly from the sitemap.
 void setCallable(boolean isCallable)
          Sets whether it is allowed to call this layout directly from the sitemap.
 void setDescription(java.lang.String description)
          Sets the description of this layout.
 void setExtendsName(java.lang.String extendsName)
          Sets the name of the layout this layout extends.
 void setIncludes(java.util.Map<java.lang.String,PatchworkInclude> includes)
          Sets the PatchworkIncludes this layout contains.
 void setName(java.lang.String name)
          Sets the name of the layout.
 void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
          Sets the properties configured within this layout.
 void setTemplatePath(java.lang.String templatePath)
          Sets the path of the template which belongs to this layout.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getConfig

public PatchworkConfiguration getConfig()
Returns the configuration object this layout belongs to.

Returns:

getContentDescriptors

public java.util.Map<java.lang.String,ContentProviderDescriptor> getContentDescriptors()
Get all local content descriptors, belonging to this layout.

Returns:

getProperties

public java.util.Map<java.lang.String,java.lang.String> getProperties()
Returns the properties configured within this layout. This can be done, using a element NOTE: This is part of the contentwork module and not necessary running patchwork as standalone.

Returns:

setProperties

public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Sets the properties configured within this layout. This can be done, using a element NOTE: This is part of the contentwork module and not necessary running patchwork as standalone.


getExtendsName

public java.lang.String getExtendsName()
Returns the name of the layout this layout extends.

Returns:
Returns the extendsName.

setExtendsName

public void setExtendsName(java.lang.String extendsName)
Sets the name of the layout this layout extends.

Parameters:
extendsName - The extendsName to set.

isCallable

public boolean isCallable()
Returns true if it is allowed to call this layout directly from the sitemap.

Returns:

setCallable

public void setCallable(boolean isCallable)
Sets whether it is allowed to call this layout directly from the sitemap.


getIncludes

public java.util.Map<java.lang.String,PatchworkInclude> getIncludes()
Retuns all PatchworkIncludes which're defined within this layout.

Returns:
Returns the includes.

getDescription

public java.lang.String getDescription()
Returns the description of this layout.

Returns:
Returns the description.

getName

public java.lang.String getName()
Returns the name of this layout.

Returns:
Returns the name.

setIncludes

public void setIncludes(java.util.Map<java.lang.String,PatchworkInclude> includes)
Sets the PatchworkIncludes this layout contains.

Parameters:
contains - The includes to set.

setDescription

public void setDescription(java.lang.String description)
Sets the description of this layout.

Parameters:
description - The description to set.

setName

public void setName(java.lang.String name)
Sets the name of the layout.

Parameters:
name - The name to set.

setTemplatePath

public void setTemplatePath(java.lang.String templatePath)
Sets the path of the template which belongs to this layout.

Parameters:
string -

getTemplatePath

public java.lang.String getTemplatePath()
Returns the path of the template which belongs to this layout.

Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

createInclude

public PatchworkInclude createInclude(java.lang.String name,
                                      PatchworkLayout layout,
                                      java.lang.String templatePath)
Factory method to create a new patchwork include.

Parameters:
name - The name of the include.
layout - The layout object, this include refers to.
templatePath - The template path this include defines.
Returns:
The new include object.

getInfoString

public java.lang.String getInfoString()
Returns a more readable string respresentation of this layout object. The method toString is not used for that, because within JXTemplate or other template engines the toString representation of this object should always return the template path of this layout.

Returns:


Copyright © 2007. All Rights Reserved.