org.sf.bluprints
Class Bluprint

java.lang.Object
  extended by org.sf.bluprints.Bluprint
All Implemented Interfaces:
Cloneable

public class Bluprint
extends Object
implements Cloneable

This class is a single Bluprint definition.

Author:
Brian Pontarelli

Constructor Summary
Bluprint()
           
 
Method Summary
 Bluprint clone()
           
 Map<String,Bluprint> getContent()
           Returns a Map of the content (child) Bluprints of this Bluprint.
 String[] getContentNames()
          Returns the list of the names of all the content in this Bluprint.
 String getExtends()
          Returns the name of the Bluprint that this Bluprint is extending.
 String getName()
           
 Map<String,String> getParameters()
           Returns the Map of parameters for this Bluprint.
 String getUri()
           
 void setContent(List<Bluprint> content)
          Sets the content of this Bluprint.
 void setExtends(String extend)
          Sets the name of the parent Bluprint.
 void setName(String name)
           
 void setUri(String uri)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Bluprint

public Bluprint()
Method Detail

getName

public String getName()

setName

public void setName(String name)

getUri

public String getUri()

setUri

public void setUri(String uri)

getExtends

public String getExtends()
Returns the name of the Bluprint that this Bluprint is extending.

Returns:
The name of the parent Bluprint or null.

setExtends

public void setExtends(String extend)
Sets the name of the parent Bluprint. This DOES NOT change the reference to the parent Blurpint. Changing this value without updating the reference will cause this Bluprint's state to get out of sync and become corrupt. Use this method with enormous caution.

Parameters:
extend - The name of the parent of this Bluprint.

getContent

public Map<String,Bluprint> getContent()

Returns a Map of the content (child) Bluprints of this Bluprint. This Map is not live and is immutable! Changes made to this Map do not effect the state of this Bluprint. In fact, the only way to make changes to the content of this Bluprint is to set in new content.

NOTE: This Map contains the content of this Bluprint as well as this Bluprints parent. This is done so that the Bluprint's content is fully constructed at all times.

Returns:
The Map of this Bluprints complete content including content from its parent.

setContent

public void setContent(List<Bluprint> content)
Sets the content of this Bluprint. This replaces the current content of this Bluprint.

Parameters:
content - The new content of this Bluprint.

getContentNames

public String[] getContentNames()
Returns the list of the names of all the content in this Bluprint. This list is in the order specified in the bluprint.xml file.

Returns:
The list of content names.

getParameters

public Map<String,String> getParameters()

Returns the Map of parameters for this Bluprint. This Map is not live! Changes made to this Map do not effect this Bluprint. There is currently no access (except package protected) to the Map of parameters for this Bluprint only.

NOTE: This Map contains the parameters from this Bluprint, this Bluprints container and this Bluprints parent. This is done so that the Map contains the full set of parameters that are available to this Bluprint.

Returns:
The Map of parameters that this Bluprint has access to.

clone

public Bluprint clone()
Overrides:
clone in class Object

toString

public String toString()
Overrides:
toString in class Object


"Copyright © 2002, Bluprints, Creative Commons License"