net.sf.sail.core.beans
Class Pod

java.lang.Object
  extended by java.beans.beancontext.BeanContextChildSupport
      extended by java.beans.beancontext.BeanContextSupport
          extended by java.beans.beancontext.BeanContextServicesSupport
              extended by net.sf.sail.core.beans.Pod
All Implemented Interfaces:
java.beans.beancontext.BeanContext, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextServiceRevokedListener, java.beans.beancontext.BeanContextServices, java.beans.beancontext.BeanContextServicesListener, java.beans.DesignMode, java.beans.PropertyChangeListener, java.beans.VetoableChangeListener, java.beans.Visibility, java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.EventListener

public class Pod
extends java.beans.beancontext.BeanContextServicesSupport

Bean representing the reusable Pod container.

Author:
turadg
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.beans.beancontext.BeanContextServicesSupport
java.beans.beancontext.BeanContextServicesSupport.BCSSChild, java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider, java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider
 
Nested classes/interfaces inherited from class java.beans.beancontext.BeanContextSupport
java.beans.beancontext.BeanContextSupport.BCSChild, java.beans.beancontext.BeanContextSupport.BCSIterator
 
Field Summary
static java.lang.String PROPERTY_POD_ID
          Make this a constant so other classes can use this property name
 
Fields inherited from class java.beans.beancontext.BeanContextServicesSupport
bcsListeners, proxy, serializable, services
 
Fields inherited from class java.beans.beancontext.BeanContextSupport
bcmListeners, children, designTime, locale, okToUseGui
 
Fields inherited from class java.beans.beancontext.BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
 
Fields inherited from interface java.beans.beancontext.BeanContext
globalHierarchyLock
 
Fields inherited from interface java.beans.DesignMode
PROPERTYNAME
 
Constructor Summary
Pod()
           
 
Method Summary
 boolean add(java.lang.Object targetChild)
           
 void assemble(PodRegistry registry)
           
 void bind(java.lang.String varName, PropertyRef propertyRef, boolean isTransient)
          Deprecated. 
protected  Pod childWithId(PodUuid podId)
           
 void exportProperty(PropertyRef propertyRef, java.lang.String exportSocketName)
          Export propertyRef as exportSocketName.
 java.util.List<Assignment> getAssemblyCalls()
           
 java.util.Set<PodUuid> getChildPodIds()
           
 java.net.URL getPodArchive()
           
 PodUuid getPodId()
           
 java.util.Set<PropertyRef> getTransientRefs()
           
 java.util.Map<java.lang.String,PropertyRef> getVars()
           
 int hashCode()
           
 void importProperty(PropertyRef propertyRef, java.lang.String importSocketName)
          Import propertyRef as importSocketName.
 boolean isAssembled()
           
 boolean isTransient(java.lang.Object value)
          Returns whether the value is the same as a podvar that is transient.
 boolean remove(java.lang.Object targetChild)
          Remove the member from this container.
 java.lang.Object resolve(java.lang.String varName)
           
 void setAssemblyCalls(java.util.List<Assignment> assemblyCalls)
           
 void setChildPodIds(java.util.Set<PodUuid> childPodIds)
          Used only by the XMLEncoder unmarshaller as a way of restoring references to the pod childen.
 void setPodId(PodUuid newPodId)
           
 void setTransientRefs(java.util.Set<PropertyRef> transientRefs)
           
 void setVars(java.util.Map<java.lang.String,PropertyRef> vars)
           
 java.lang.String toString()
           
 void touch()
          Record that the pod has been modified, which requires that the pod id change
 
Methods inherited from class java.beans.beancontext.BeanContextServicesSupport
addBeanContextServicesListener, addService, addService, bcsPreDeserializationHook, bcsPreSerializationHook, childJustRemovedHook, createBCSChild, createBCSSServiceProvider, fireServiceAdded, fireServiceAdded, fireServiceRevoked, fireServiceRevoked, getBeanContextServicesPeer, getChildBeanContextServicesListener, getCurrentServiceClasses, getCurrentServiceSelectors, getService, hasService, initialize, initializeBeanContextResources, releaseBeanContextResources, releaseService, removeBeanContextServicesListener, revokeService, serviceAvailable, serviceRevoked
 
Methods inherited from class java.beans.beancontext.BeanContextSupport
addAll, addBeanContextMembershipListener, avoidingGui, bcsChildren, childDeserializedHook, childJustAddedHook, classEquals, clear, contains, containsAll, containsKey, copyChildren, deserialize, dontUseGui, fireChildrenAdded, fireChildrenRemoved, getBeanContextPeer, getChildBeanContextChild, getChildBeanContextMembershipListener, getChildPropertyChangeListener, getChildSerializable, getChildVetoableChangeListener, getChildVisibility, getLocale, getResource, getResourceAsStream, instantiateChild, isDesignTime, isEmpty, isSerializing, iterator, needsGui, okToUseGui, propertyChange, readChildren, remove, removeAll, removeBeanContextMembershipListener, retainAll, serialize, setDesignTime, setLocale, size, toArray, toArray, validatePendingAdd, validatePendingRemove, vetoableChange, writeChildren
 
Methods inherited from class java.beans.beancontext.BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, validatePendingSetBeanContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.beans.beancontext.BeanContext
addBeanContextMembershipListener, getResource, getResourceAsStream, instantiateChild, removeBeanContextMembershipListener
 
Methods inherited from interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
 
Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.beans.DesignMode
isDesignTime, setDesignTime
 
Methods inherited from interface java.beans.Visibility
avoidingGui, dontUseGui, needsGui, okToUseGui
 

Field Detail

PROPERTY_POD_ID

public static final java.lang.String PROPERTY_POD_ID
Make this a constant so other classes can use this property name

See Also:
Constant Field Values
Constructor Detail

Pod

public Pod()
Method Detail

getPodId

public PodUuid getPodId()

setPodId

public void setPodId(PodUuid newPodId)

getVars

public java.util.Map<java.lang.String,PropertyRef> getVars()

setVars

public void setVars(java.util.Map<java.lang.String,PropertyRef> vars)

exportProperty

public void exportProperty(PropertyRef propertyRef,
                           java.lang.String exportSocketName)
Export propertyRef as exportSocketName. Export a property of a bean within this pod, given by propertyRef. This export will be referenced by exportSocketName so that other pods can ask for the value, using resolve(). When this pod is marshalled, the value of the property will be preserved.

Parameters:
propertyRef -
exportSocketName -

importProperty

public void importProperty(PropertyRef propertyRef,
                           java.lang.String importSocketName)
Import propertyRef as importSocketName. Import a property of a bean within this pod, given by propertyRef. This import will be referenced by importSocketName so that assembly calls can fill it in with other values. When this pod is marshalled, the property value won't be preserved since it will be set by an assembly call at load time.

Parameters:
propertyRef -
importSocketName -

bind

@Deprecated
public void bind(java.lang.String varName,
                            PropertyRef propertyRef,
                            boolean isTransient)
Deprecated. 

This should not be used outside this class. Instead use exportProperty() or importProperty() as applicable.

Parameters:
varName -
propertyRef -
isTransient -

resolve

public java.lang.Object resolve(java.lang.String varName)
Parameters:
varName -
Returns:
the current value of the property (import or export) specified by varName

getTransientRefs

public java.util.Set<PropertyRef> getTransientRefs()

setTransientRefs

public void setTransientRefs(java.util.Set<PropertyRef> transientRefs)

getAssemblyCalls

public java.util.List<Assignment> getAssemblyCalls()

setAssemblyCalls

public void setAssemblyCalls(java.util.List<Assignment> assemblyCalls)

childWithId

protected Pod childWithId(PodUuid podId)

getPodArchive

public java.net.URL getPodArchive()

assemble

public void assemble(PodRegistry registry)
              throws UnknownPodException
Throws:
UnknownPodException

add

public boolean add(java.lang.Object targetChild)
Specified by:
add in interface java.util.Collection
Overrides:
add in class java.beans.beancontext.BeanContextSupport

remove

public boolean remove(java.lang.Object targetChild)
Remove the member from this container. If the member is a child pod, also remove all references from this pod to that pod.

Specified by:
remove in interface java.util.Collection
Overrides:
remove in class java.beans.beancontext.BeanContextSupport

getChildPodIds

public java.util.Set<PodUuid> getChildPodIds()

setChildPodIds

public void setChildPodIds(java.util.Set<PodUuid> childPodIds)
Used only by the XMLEncoder unmarshaller as a way of restoring references to the pod childen. The actually pod childen become members of this pod collection during Pod.assemble()

Parameters:
childPodIds -

isTransient

public boolean isTransient(java.lang.Object value)
Returns whether the value is the same as a podvar that is transient. (i.e. should not be marshalled) Assumes instances of Pod cannot be imported.

Parameters:
value -
Returns:
true iff the value matches the current value of one of the refs in this pod marked transient

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Collection
Overrides:
hashCode in class java.lang.Object

touch

public void touch()
Record that the pod has been modified, which requires that the pod id change


isAssembled

public boolean isAssembled()
Returns:
Returns the assembled.


Copyright © 2004-2008 TELS Center. All Rights Reserved.