org.glassfish.virtualization.spi
Class TemplateCondition

java.lang.Object
  extended by org.glassfish.virtualization.spi.TemplateCondition
Direct Known Subclasses:
KeyValueType

@Contract
public abstract class TemplateCondition
extends Object

Represents a template condition (that can be used in a search criteria for a template).

Author:
Jerome Dochez

Constructor Summary
TemplateCondition()
           
 
Method Summary
static TemplateCondition from(TemplateIndex persistence)
          Returns a template condition from its persisted state.
abstract  void load(TemplateIndex persistence)
          loads its state from a persisted state.
abstract  TemplateIndex persist(Template parent)
          Persists its state to a template persistence state.
abstract  boolean satisfies(TemplateCondition otherCondition)
          Returns true if this condition satisfies another condition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateCondition

public TemplateCondition()
Method Detail

from

public static TemplateCondition from(TemplateIndex persistence)
Returns a template condition from its persisted state.

Parameters:
persistence - the persisted state
Returns:
template condition

load

public abstract void load(TemplateIndex persistence)
loads its state from a persisted state.

Parameters:
persistence - the persisted state.

persist

public abstract TemplateIndex persist(Template parent)
                               throws org.jvnet.hk2.config.TransactionFailure
Persists its state to a template persistence state.

Parameters:
parent - the parent template configuration
Returns:
the persisted state to be added to the parent's Template.getIndexes()
Throws:
org.jvnet.hk2.config.TransactionFailure - if the condition cannot be persisted successfully.

satisfies

public abstract boolean satisfies(TemplateCondition otherCondition)
Returns true if this condition satisfies another condition

Parameters:
otherCondition - the other condition to test against.
Returns:
true of this condition satisfies the other condition.


Copyright © 2012. All Rights Reserved.