Docmosis API 2.1.0

com.docmosis.template.store
Class TemplateIdentifier

java.lang.Object
  extended bycom.docmosis.template.store.TemplateIdentifier
Direct Known Subclasses:
TemplateDetails

public class TemplateIdentifier
extends Object

A Template can be uniquely identified by a name and a context. It is dependant on the type of TemplateStore used as to what might constitute a context.


Constructor Summary
TemplateIdentifier(String name)
          Construct a new template identifier with the given name and a template context matching the root (or top-level) of the store.
TemplateIdentifier(String name, TemplateContext context)
          Construct a new identifer with the given name and context.
 
Method Summary
 boolean equals(Object other)
           
 TemplateContext getContext()
          Get the context of this template.
 String getName()
          Get the name for this template id.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateIdentifier

public TemplateIdentifier(String name)
Construct a new template identifier with the given name and a template context matching the root (or top-level) of the store.

Parameters:
name - the template name.

TemplateIdentifier

public TemplateIdentifier(String name,
                          TemplateContext context)
Construct a new identifer with the given name and context.

Parameters:
name - the name for the template
context - the context (path) for the template. A null context means the root (or top-level) of the store.
Method Detail

getName

public String getName()
Get the name for this template id.


getContext

public TemplateContext getContext()
Get the context of this template. The context equates to a location in a path or hierarchy, allowing multiple templates of the same name to exist in different locations (contexts). A null context indicates that the template exists at the root of the TemplateStore.

Returns:
the template context or null if there isn't one.
See Also:
TemplateStore

equals

public boolean equals(Object other)

hashCode

public int hashCode()

toString

public String toString()

Docmosis API 2.1.0

Copyright © 2007 Docmosis. All Rights Reserved.