|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faktorips.runtime.internal.AbstractModelObject
public abstract class AbstractModelObject
Abstract base class for all policy component types.
| Field Summary | |
|---|---|
protected static boolean |
CONTINUE_VALIDATION
Constant for the return values of validate methods (i.e. |
protected static boolean |
STOP_VALIDATION
Constant for the return values of validate methods (i.e. |
| Constructor Summary | |
|---|---|
AbstractModelObject()
|
|
| Method Summary | |
|---|---|
protected AbstractModelObject |
createChildFromXml(Element childEl)
|
protected IUnresolvedReference |
createUnresolvedReference(Object objectId,
String targetRole,
String targetId)
|
protected void |
initAssociationFromXml(Element el,
Object objectId,
IObjectReferenceStore store)
|
void |
initFromXml(Element objectEl,
boolean initWithProductDefaultsBeforeReadingXmlData,
IRuntimeRepository productRepository,
IObjectReferenceStore store)
Initializes the policy component's state with the data stored in the given xml element. |
void |
initFromXml(Element objectEl,
boolean initWithProductDefaultsBeforeReadingXmlData,
IRuntimeRepository productRepository,
IObjectReferenceStore store,
XmlCallback xmlCallback)
Initializes the policy component's state with the data stored in the given xml element. |
protected void |
initFromXml(Element objectEl,
boolean initWithProductDefaultsBeforeReadingXmlData,
IRuntimeRepository productRepository,
IObjectReferenceStore store,
XmlCallback xmlCallback,
String currPath)
Initializes the policy component's state with the data stored in the given xml element. |
protected void |
initPropertiesFromXml(Map<String,String> propMap,
IRuntimeRepository productRepository)
|
void |
removeChildModelObjectInternal(IModelObject child)
Removes the given child object from this object. |
MessageList |
validate(IValidationContext context)
Validates the model object and returns a list of messages. |
void |
validate(MessageList list,
IValidationContext context)
Validates the policy component and adds any messages generated to the given list. |
protected void |
validateDependants(MessageList list,
IValidationContext context)
Validates the policy component's dependant components and adds any message generated to the given list. |
protected boolean |
validateSelf(MessageList list,
IValidationContext context)
Validates this policy component's state without validating the dependant components. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final boolean STOP_VALIDATION
protected static final boolean CONTINUE_VALIDATION
| Constructor Detail |
|---|
public AbstractModelObject()
| Method Detail |
|---|
public void removeChildModelObjectInternal(IModelObject child)
null, the method does nothing.
child - The child you want to removepublic MessageList validate(IValidationContext context)
IModelObject
validate in interface IModelObjectcontext - provides additional external information that might be necessary to execute
the validation. E.g. the business context, the locale to provide locale specific
message texts, user information. The parameter must not be null.
public void validate(MessageList list,
IValidationContext context)
context - provides additional external information that might be necessary to execute
the validation. E.g. the business context, the locale to provide locale specific
message texts, user information
NullPointerException - if the list is null and a message is generated.
This method is model internal, it is not part of the published interface and
should not be used by clients
protected void validateDependants(MessageList list,
IValidationContext context)
The default implementation does nothing. Should be overridden in subclasses.
list - The message listcontext - provides additional external information that might be necessary to execute
the validation. E.g. the business context, the locale to provide locale specific
message texts, user information
NullPointerException - if list is null and a message is generated.
protected boolean validateSelf(MessageList list,
IValidationContext context)
The default implementation does nothing. Should be overridden in subclasses.
list - the message listcontext - provides additional external information that might be necessary to execute
the validation. E.g. the business context, the locale to provide locale specific
message texts, user information
true if this model object should continue validating, false
else.
NullPointerException - if list is null and a message is generated.
public void initFromXml(Element objectEl,
boolean initWithProductDefaultsBeforeReadingXmlData,
IRuntimeRepository productRepository,
IObjectReferenceStore store)
objectEl - Xml element containing the state data.initWithProductDefaultsBeforeReadingXmlData - true if the policy component
should be initialized with the product defaults.productRepository - The repository that contains the product components.store - The store where unresolved references are stored in (so that they can be
resolved after all objects have been initialized from xml).
public void initFromXml(Element objectEl,
boolean initWithProductDefaultsBeforeReadingXmlData,
IRuntimeRepository productRepository,
IObjectReferenceStore store,
XmlCallback xmlCallback)
objectEl - Xml element containing the state data.initWithProductDefaultsBeforeReadingXmlData - true if the policy component
should be initialized with the product defaults.productRepository - The repository that contains the product components.store - The store where unresolved references are stored in (so that they can be
resolved after all objects have been initialized from xml).xmlCallback - An XML callback class which could handle enhanced xml initialization of
the current element.
protected void initFromXml(Element objectEl,
boolean initWithProductDefaultsBeforeReadingXmlData,
IRuntimeRepository productRepository,
IObjectReferenceStore store,
XmlCallback xmlCallback,
String currPath)
objectEl - Xml element containing the state data.initWithProductDefaultsBeforeReadingXmlData - true if the policy component
should be initialized with the product defaults.productRepository - The repository that contains the product components.store - The store where unresolved references are stored in (so that they can be
resolved after all objects have been initialized from xml).xmlCallback - An XML callback class which could handle enhanced xml initialization of
the current element.currPath - The path inside the XML tree structure. Starting from the root element.
protected void initPropertiesFromXml(Map<String,String> propMap,
IRuntimeRepository productRepository)
propMap - The property mapproductRepository - the runtime repositoryprotected AbstractModelObject createChildFromXml(Element childEl)
childEl - The child element
protected void initAssociationFromXml(Element el,
Object objectId,
IObjectReferenceStore store)
protected IUnresolvedReference createUnresolvedReference(Object objectId,
String targetRole,
String targetId)
throws Exception
objectId - object idtargetRole - target roletargetId - target id
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||