SmartFrog 3.10.000

org.smartfrog.sfcore.reference
Class PropertyReferencePart

java.lang.Object
  extended by org.smartfrog.sfcore.reference.ReferencePart
      extended by org.smartfrog.sfcore.reference.PropertyReferencePart
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Copying

public class PropertyReferencePart
extends ReferencePart

Implements the property reference part. This part resolves to the system property with given value. References are not forwarded from here, so having this part in the middle of a reference does NOT make sense!

See Also:
Serialized Form

Field Summary
static java.lang.String PROPERTY
          Base string representation of this part (PROPERTY).
 java.lang.Object value
           
 
Constructor Summary
PropertyReferencePart(java.lang.Object v)
          Constructs PropertyReferencePart with a property.
 
Method Summary
 boolean equals(java.lang.Object refPart)
          Compares this reference part with another one.
 int hashCode()
          Returns hashcode of this part.
 java.lang.Object resolve(ReferenceResolver rr, Reference r, int index)
          Resolves this reference part using the reference resolver.
 java.lang.Object resolve(RemoteReferenceResolver rr, Reference r, int index)
          Resolves this reference part using the remote reference resolver.
 java.lang.String toString()
          Returns a string representation of the reference part.
 
Methods inherited from class org.smartfrog.sfcore.reference.ReferencePart
attrib, clone, copy, forwardReference, here, host, iproperty, parent, process, property, root, thisref, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY

public static final java.lang.String PROPERTY
Base string representation of this part (PROPERTY).

See Also:
Constant Field Values

value

public java.lang.Object value
Constructor Detail

PropertyReferencePart

public PropertyReferencePart(java.lang.Object v)
Constructs PropertyReferencePart with a property.

Parameters:
v - value for property
Method Detail

toString

public java.lang.String toString()
Returns a string representation of the reference part. Overrides HereReferencePart.toString.

Specified by:
toString in class ReferencePart
Returns:
stringified reference part

hashCode

public int hashCode()
Returns hashcode of this part. This is the hashCode of the stored value plus the ATTRIB hashcode.

Specified by:
hashCode in class ReferencePart
Returns:
hash code for part

equals

public boolean equals(java.lang.Object refPart)
Compares this reference part with another one. Equality means that the type and value are equal

Specified by:
equals in class ReferencePart
Parameters:
refPart - to be compared to
Returns:
true if equal, false if not

resolve

public java.lang.Object resolve(ReferenceResolver rr,
                                Reference r,
                                int index)
                         throws SmartFrogResolutionException
Resolves this reference part using the reference resolver. The originating reference and index are needed to enable request forwarding

Specified by:
resolve in class ReferencePart
Parameters:
rr - reference resolver
r - reference which this part sits in
index - index of this reference part in r
Returns:
the attribute found on resolution
Throws:
SmartFrogResolutionException - if failed to resolve reference

resolve

public java.lang.Object resolve(RemoteReferenceResolver rr,
                                Reference r,
                                int index)
                         throws SmartFrogResolutionException
Resolves this reference part using the remote reference resolver. The originating reference and index are needed to enable request forwarding

Specified by:
resolve in class ReferencePart
Parameters:
rr - reference resolver
r - reference which this part sits in
index - index of this reference part in r
Returns:
the attribute found on resolution
Throws:
SmartFrogResolutionException - if failed to resolve reference

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP