org.netbeans.modules.bpel.model.impl
Class IfImpl

java.lang.Object
  extended by org.netbeans.modules.xml.xam.AbstractComponent<C>
      extended by org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent<BpelEntity>
          extended by org.netbeans.modules.bpel.model.impl.BpelEntityImpl
              extended by org.netbeans.modules.bpel.model.impl.BpelContainerImpl
                  extended by org.netbeans.modules.bpel.model.impl.ExtensibleElementsImpl
                      extended by org.netbeans.modules.bpel.model.impl.NamedElementImpl
                          extended by org.netbeans.modules.bpel.model.impl.ActivityImpl
                              extended by org.netbeans.modules.bpel.model.impl.ConditionalActivity
                                  extended by org.netbeans.modules.bpel.model.impl.IfImpl
All Implemented Interfaces:
Activity, ActivityHolder, BpelContainer, BpelEntity, ConditionHolder, ExtendableActivity, ExtensibleElements, If, JoinFailureSuppressor, NamedElement, BpelReferenceable, AfterExtensions, AfterImport, AfterSources, AfterTargets, Component<BpelEntity>, DocumentComponent<BpelEntity>, DocumentModelAccess.NodeUpdater, Named<BpelEntity>, Referenceable

public class IfImpl
extends ConditionalActivity
implements If

Author:
ads

Nested Class Summary
 
Nested classes/interfaces inherited from class org.netbeans.modules.bpel.model.impl.BpelContainerImpl
BpelContainerImpl.CopyKey, BpelContainerImpl.Multiplicity
 
Nested classes/interfaces inherited from class org.netbeans.modules.bpel.model.impl.BpelEntityImpl
BpelEntityImpl.IdMapKey
 
Nested classes/interfaces inherited from class org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent
AbstractDocumentComponent.PrefixAttribute
 
Field Summary
 
Fields inherited from interface org.netbeans.modules.bpel.model.api.BpelEntity
BUSINESS_PROCESS_1_1_NS_URI, BUSINESS_PROCESS_DRAFT_NS_URI, BUSINESS_PROCESS_NS_URI
 
Fields inherited from interface org.netbeans.modules.xml.xam.dom.DocumentComponent
TEXT_CONTENT_PROPERTY
 
Fields inherited from interface org.netbeans.modules.bpel.model.api.JoinFailureSuppressor
SUPPRESS_JOIN_FAILURE
 
Fields inherited from interface org.netbeans.modules.bpel.model.api.NamedElement
NAME
 
Fields inherited from interface org.netbeans.modules.xml.xam.Named
NAME_PROPERTY
 
Fields inherited from interface org.netbeans.modules.bpel.model.api.BpelEntity
BUSINESS_PROCESS_1_1_NS_URI, BUSINESS_PROCESS_DRAFT_NS_URI, BUSINESS_PROCESS_NS_URI
 
Fields inherited from interface org.netbeans.modules.xml.xam.dom.DocumentComponent
TEXT_CONTENT_PROPERTY
 
Fields inherited from interface org.netbeans.modules.bpel.model.api.BpelEntity
BUSINESS_PROCESS_1_1_NS_URI, BUSINESS_PROCESS_DRAFT_NS_URI, BUSINESS_PROCESS_NS_URI
 
Fields inherited from interface org.netbeans.modules.xml.xam.dom.DocumentComponent
TEXT_CONTENT_PROPERTY
 
Fields inherited from interface org.netbeans.modules.bpel.model.api.BpelEntity
BUSINESS_PROCESS_1_1_NS_URI, BUSINESS_PROCESS_DRAFT_NS_URI, BUSINESS_PROCESS_NS_URI
 
Fields inherited from interface org.netbeans.modules.xml.xam.dom.DocumentComponent
TEXT_CONTENT_PROPERTY
 
Constructor Summary
IfImpl(BpelBuilderImpl builder)
           
IfImpl(BpelModelImpl model, org.w3c.dom.Element e)
           
 
Method Summary
 void accept(BpelModelVisitor visitor)
          This method will apply visitor to this OM element.
 void addElseIf(ElseIf value)
          Adds new value to the end of list.
protected  BpelEntity create(org.w3c.dom.Element element)
          This method should be implemented by each container .
 ExtendableActivity getActivity()
           
protected
<T extends BpelEntity>
java.lang.Class<? extends BpelEntity>
getChildType(T entity)
          This method possibly needs to be overriden by some containers...
 java.lang.Class<? extends BpelEntity> getElementType()
           
 Else getElse()
           
 ElseIf getElseIf(int i)
           
 ElseIf[] getElseIfs()
           
protected  BpelContainerImpl.Multiplicity getMultiplicity(BpelEntity entity)
          This method should be overriden in concrete implementation if entity can present in this container with not unbounded multiplicity.
 void insertElseIf(ElseIf value, int i)
          Insert new value in ElseIf array children.
 void removeActivity()
          Removes child activity from this holder.
 void removeElse()
          Removes Else entity.
 void removeElseIf(int i)
          Removes i-th element .
 void setActivity(ExtendableActivity activity)
          Set activity as child in this holder.
 void setElse(Else value)
          Set new value as Else entity.
 void setElseIf(ElseIf value, int i)
          Set value on the i-th place.
 void setElseIfs(ElseIf[] value)
          Set new ElseIf children to this container.
 int sizeElseIfs()
           
 
Methods inherited from class org.netbeans.modules.bpel.model.impl.ConditionalActivity
getCondition, removeCondition, setCondition
 
Methods inherited from class org.netbeans.modules.bpel.model.impl.ActivityImpl
getDomainAttributes, getSourceContainer, getSuppressJoinFailure, getTargetContainer, removeName, removeSourceContainer, removeSuppressJoinFailure, removeTargetContainer, setSourceContainer, setSuppressJoinFailure, setTargetContainer
 
Methods inherited from class org.netbeans.modules.bpel.model.impl.NamedElementImpl
getName, setName
 
Methods inherited from class org.netbeans.modules.bpel.model.impl.ExtensibleElementsImpl
addDocumentation, addExtensionEntity, getDocumentation, getDocumentation, getDocumentations, getExtensionChildren, insertDocumentation, removeDocumentation, removeDocumentation, setDocumentation, setDocumentation, setDocumentations, sizeOfDocumentations
 
Methods inherited from class org.netbeans.modules.bpel.model.impl.BpelContainerImpl
addChild, addChildAfter, addChildBefore, canPaste, getChild, getChild, getChildren, indexOf, insertAtAbsoluteIndex, insertAtIndex, insertAtIndexAfter, isRegular, populateChildren, remove, removeChild, removeChild, setArrayAfter, setArrayBefore, setChild, setChildAtIndex
 
Methods inherited from class org.netbeans.modules.bpel.model.impl.BpelEntityImpl
accept, acceptChildren, checkDeleted, checkInTree, copy, copy, createReference, createSchemaReference, createWSDLReference, cut, getAttribute, getAttributeAccess, getAttributeValueOf, getBooleanAttribute, getBpelModel, getBpelReference, getBpelReferenceList, getCookie, getCookies, getCorrectedText, getEntityName, getModel, getNamespaceContext, getParent, getQNameAttribute, getSchemaReference, getSchemaReferenceList, getText, getUID, getWSDLReference, getWSDLReferenceList, handleAttributeChange, isDeleted, isInTree, postGlobalEvent, postGlobalEvent, readLock, readUnlock, removeAttribute, removeCookie, removeReference, setAttribute, setBpelAttribute, setBpelAttribute, setBpelAttribute, setBpelReference, setBpelReferenceList, setCookie, setCookies, setDeleted, setInTree, setInTreeRecursively, setSchemaReference, setText, setText, setUID, setWSDLReference, setWSDLReferenceList, updateReference, writeLock, writeUnlock
 
Methods inherited from class org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent
addPrefix, appendChildQuietly, createPrefixAttribute, ensureUnique, ensureValueNamespaceDeclared, findAttributePosition, findChildComponent, findChildComponentByIdentity, findDomainIndex, findPosition, fireChildAdded, fireChildRemoved, firePropertyChange, fireValueChanged, getAccess, getAnyAttribute, getAttributeMap, getChildElement, getChildElementText, getEffectiveParent, getLeadingText, getNamespaceURI, getNodeIndexOf, getPeer, getPrefixedName, getPrefixedName, getPrefixedName, getPrefixes, getQName, getQName, getText, getText, getTrailingText, getXmlFragment, getXmlFragmentInclusive, insertAtIndexQuietly, isInDocumentModel, lookupNamespaceURI, lookupNamespaceURI, lookupPrefix, referencesSameNode, removeAttributeQuietly, removeChildQuietly, removePrefix, resolveModel, setAnyAttribute, setAttributeQuietly, setChildElementText, setLeadingText, setQNameAttribute, setText, setTrailingText, setXmlFragment, updatePeer, updateReference, updateReference, updateReference, verifyWrite
 
Methods inherited from class org.netbeans.modules.xml.xam.AbstractComponent
addAfter, addBefore, addPropertyChangeListener, appendChild, checkNullOrDuplicateChild, getChildren, getChildren, insertAtIndex, insertAtIndex, isChildrenInitialized, removeChild, removeComponentListener, removePropertyChangeListener, setChild, setChild, setChildAfter, setChildBefore, setModel, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.Activity
getSourceContainer, getTargetContainer, removeName, removeSourceContainer, removeTargetContainer, setSourceContainer, setTargetContainer
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.ExtensibleElements
addDocumentation, addExtensionEntity, getDocumentation, getDocumentation, getDocumentations, getExtensionChildren, insertDocumentation, removeDocumentation, removeDocumentation, setDocumentation, setDocumentation, setDocumentations, sizeOfDocumentations
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.BpelContainer
indexOf, remove
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.BpelEntity
accept, copy, cut, getBpelModel, getCookie, getNamespaceContext, getParent, getUID, removeCookie, setCookie
 
Methods inherited from interface org.netbeans.modules.xml.xam.dom.DocumentComponent
findAttributePosition, findChildComponent, findPosition, getAttribute, getPeer, isInDocumentModel, referencesSameNode, setAttribute
 
Methods inherited from interface org.netbeans.modules.xml.xam.Component
canPaste, copy, getChildren, getChildren, getChildren, getModel
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.JoinFailureSuppressor
getSuppressJoinFailure, removeSuppressJoinFailure, setSuppressJoinFailure
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.NamedElement
getName, setName
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.BpelContainer
indexOf, remove
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.BpelEntity
accept, copy, cut, getBpelModel, getCookie, getNamespaceContext, getParent, getUID, removeCookie, setCookie
 
Methods inherited from interface org.netbeans.modules.xml.xam.dom.DocumentComponent
findAttributePosition, findChildComponent, findPosition, getAttribute, getPeer, isInDocumentModel, referencesSameNode, setAttribute
 
Methods inherited from interface org.netbeans.modules.xml.xam.Component
canPaste, copy, getChildren, getChildren, getChildren, getModel
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.BpelEntity
accept, copy, cut, getBpelModel, getCookie, getNamespaceContext, getParent, getUID, removeCookie, setCookie
 
Methods inherited from interface org.netbeans.modules.xml.xam.dom.DocumentComponent
findAttributePosition, findChildComponent, findPosition, getAttribute, getPeer, isInDocumentModel, referencesSameNode, setAttribute
 
Methods inherited from interface org.netbeans.modules.xml.xam.Component
canPaste, copy, getChildren, getChildren, getChildren, getModel
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.ExtensibleElements
addDocumentation, addExtensionEntity, getDocumentation, getDocumentation, getDocumentations, getExtensionChildren, insertDocumentation, removeDocumentation, removeDocumentation, setDocumentation, setDocumentation, setDocumentations, sizeOfDocumentations
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.BpelContainer
indexOf, remove
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.BpelEntity
accept, copy, cut, getBpelModel, getCookie, getNamespaceContext, getParent, getUID, removeCookie, setCookie
 
Methods inherited from interface org.netbeans.modules.xml.xam.dom.DocumentComponent
findAttributePosition, findChildComponent, findPosition, getAttribute, getPeer, isInDocumentModel, referencesSameNode, setAttribute
 
Methods inherited from interface org.netbeans.modules.xml.xam.Component
canPaste, copy, getChildren, getChildren, getChildren, getModel
 
Methods inherited from interface org.netbeans.modules.bpel.model.api.ConditionHolder
getCondition, removeCondition, setCondition
 

Constructor Detail

IfImpl

IfImpl(BpelModelImpl model,
       org.w3c.dom.Element e)

IfImpl

IfImpl(BpelBuilderImpl builder)
Method Detail

getActivity

public ExtendableActivity getActivity()
Specified by:
getActivity in interface ActivityHolder
Returns:
child activity in this holder.

setActivity

public void setActivity(ExtendableActivity activity)
Description copied from interface: ActivityHolder
Set activity as child in this holder.

Specified by:
setActivity in interface ActivityHolder
Parameters:
activity - object for set.

removeActivity

public void removeActivity()
Description copied from interface: ActivityHolder
Removes child activity from this holder.

Specified by:
removeActivity in interface ActivityHolder

getElseIfs

public ElseIf[] getElseIfs()
Specified by:
getElseIfs in interface If
Returns:
Array of ElseIf entities.

setElseIfs

public void setElseIfs(ElseIf[] value)
Description copied from interface: If
Set new ElseIf children to this container.

Specified by:
setElseIfs in interface If
Parameters:
value - New array of children.

insertElseIf

public void insertElseIf(ElseIf value,
                         int i)
Description copied from interface: If
Insert new value in ElseIf array children.

Specified by:
insertElseIf in interface If
Parameters:
value - New entity.
i - index for insert.

addElseIf

public void addElseIf(ElseIf value)
Description copied from interface: If
Adds new value to the end of list.

Specified by:
addElseIf in interface If
Parameters:
value - New ElseIf entity.

getElseIf

public ElseIf getElseIf(int i)
Specified by:
getElseIf in interface If
Parameters:
i - index in array.
Returns:
i-th ElseIf entity.

setElseIf

public void setElseIf(ElseIf value,
                      int i)
Description copied from interface: If
Set value on the i-th place.

Specified by:
setElseIf in interface If
Parameters:
value - New value.
i - index in array.

removeElseIf

public void removeElseIf(int i)
Description copied from interface: If
Removes i-th element .

Specified by:
removeElseIf in interface If
Parameters:
i - index in array.

getElse

public Else getElse()
Specified by:
getElse in interface If
Returns:
Else child entity.

setElse

public void setElse(Else value)
Description copied from interface: If
Set new value as Else entity.

Specified by:
setElse in interface If
Parameters:
value - New Else entity.

removeElse

public void removeElse()
Description copied from interface: If
Removes Else entity.

Specified by:
removeElse in interface If

getElementType

public java.lang.Class<? extends BpelEntity> getElementType()
Specified by:
getElementType in interface BpelEntity
Returns:
interface in OM that represented by this entity.

sizeElseIfs

public int sizeElseIfs()
Specified by:
sizeElseIfs in interface If
Returns:
Size of ElseIf children elements.

accept

public void accept(BpelModelVisitor visitor)
Description copied from interface: BpelEntity
This method will apply visitor to this OM element. visitor should perform navigation in tree ( if it wants by itself ).

Specified by:
accept in interface BpelEntity
Parameters:
visitor - visitor for OM.

create

protected BpelEntity create(org.w3c.dom.Element element)
Description copied from class: BpelContainerImpl
This method should be implemented by each container . Container should recognize in element its child and create Bpel element respectively. Warning! Here exist some possibility for error. Each container should recognize only those children that could be inside it as specification said. One cannot create one static mehtod for recognition all BPEL elements because f.e. container VariableContainer could have ONLY Variable inside it. It cannot have "flow" tag inside it ( it can have "flow" but this is just extention element that will not be treated as BPEL element ).

Overrides:
create in class ConditionalActivity
Returns:

getChildType

protected <T extends BpelEntity> java.lang.Class<? extends BpelEntity> getChildType(T entity)
Description copied from class: BpelContainerImpl
This method possibly needs to be overriden by some containers... F.e. it SHOULD to be overriden ActivityHolder and CompositeActivity because in these cases those containers contains elements as a whole they don't distinguish them by its own types ( Empty.class , etc. ). They need to count index for such children in common array ,not personal array.

Overrides:
getChildType in class BpelContainerImpl

getMultiplicity

protected BpelContainerImpl.Multiplicity getMultiplicity(BpelEntity entity)
Description copied from class: BpelContainerImpl
This method should be overriden in concrete implementation if entity can present in this container with not unbounded multiplicity.

Overrides:
getMultiplicity in class ConditionalActivity