com.logabit.webtools.patchwork
Class PatchworkConfiguration

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

public class PatchworkConfiguration
extends java.lang.Object

This class represents a parsed patchwork configuration.

Author:
Stephan Niedermeier

Constructor Summary
PatchworkConfiguration()
           
 
Method Summary
 boolean containsPatchworkLayout(java.lang.String name)
          Returns true if this config contains a PatchworkLayout with given name.
 PatchworkLayout createPatchworkLayout(java.lang.String name, java.lang.String extendsName)
          Factory method for creating a new patchwork layout instance.
 java.util.Map<java.lang.String,ContentProviderDescriptor> getGlobalContentDescriptors()
          Returns all global content descriptors.
 long getLastModified()
          Returns the timestamp this PatchworkConfiguration was created.
 java.util.Map getPatchworkLayouts()
          Returns all PatchworkLayouts this PatchworkConfiguration contains.
 java.lang.String getVersion()
          Returns the version attribute for compatibility tests.
 void setLastModified(long lastModified)
          Sets the timestamp this PatchworkConfiguration was created.
 void setVersion(java.lang.String version)
          Sets the version attribute for compatibility tests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatchworkConfiguration

public PatchworkConfiguration()
Method Detail

containsPatchworkLayout

public boolean containsPatchworkLayout(java.lang.String name)
Returns true if this config contains a PatchworkLayout with given name.

Parameters:
name - - The name of the layout
Returns:

getPatchworkLayouts

public java.util.Map getPatchworkLayouts()
Returns all PatchworkLayouts this PatchworkConfiguration contains.

Returns:
Returns the patchwork layouts where key=layoutName.

getVersion

public java.lang.String getVersion()
Returns the version attribute for compatibility tests.

Returns:
Returns the version.

setVersion

public void setVersion(java.lang.String version)
Sets the version attribute for compatibility tests.

Parameters:
version - The version to set.

getLastModified

public long getLastModified()
Returns the timestamp this PatchworkConfiguration was created.

Returns:

setLastModified

public void setLastModified(long lastModified)
Sets the timestamp this PatchworkConfiguration was created.

Parameters:
lastModified -

createPatchworkLayout

public PatchworkLayout createPatchworkLayout(java.lang.String name,
                                             java.lang.String extendsName)
Factory method for creating a new patchwork layout instance.

Parameters:
name - - The name of the layout. If a layout with that name already exists, it will be overwritten by the new one.
extendsName - - The name of the layout the new layout inherits from or null if no extends attribute was given.
Returns:
The created patchwork layout.

getGlobalContentDescriptors

public java.util.Map<java.lang.String,ContentProviderDescriptor> getGlobalContentDescriptors()
Returns all global content descriptors. These are all content descriptors which are defined as direct child of the root element. They can be referenced from within any layout.

Returns:
The global content descriptors where the key = Name of the descriptor.


Copyright © 2007. All Rights Reserved.