SmartFrog 3.10.000

org.smartfrog.sfcore.reference
Class AttribReferencePart

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

public class AttribReferencePart
extends HereReferencePart

Implements the attrib reference part. This part resolves to the nearest container which has the given attribute (then the rest of the reference is forwarded to that attribute value)

See Also:
Serialized Form

Field Summary
static java.lang.String ATTRIB
          Base string representation of this part (ATTRIB).
 
Fields inherited from class org.smartfrog.sfcore.reference.HereReferencePart
HERE
 
Constructor Summary
AttribReferencePart(java.lang.Object v)
          Constructs AttribReferencePart with a attribute.
 
Method Summary
 ReferencePart asAttribReferencePart()
          Returns this object since this is already an attrib reference part.
 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.
 java.lang.String toString(int index)
          Return a string which is a representation of the reference part in a reference in the index position given.
 
Methods inherited from class org.smartfrog.sfcore.reference.HereReferencePart
equals, getValue, setValue, sfGetProcessLog
 
Methods inherited from class org.smartfrog.sfcore.reference.ReferencePart
attrib, clone, copy, forwardReference, here, host, iproperty, parent, process, property, root, thisref
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTRIB

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

See Also:
Constant Field Values
Constructor Detail

AttribReferencePart

public AttribReferencePart(java.lang.Object v)
Constructs AttribReferencePart with a attribute.

Parameters:
v - value for attrib part
Method Detail

asAttribReferencePart

public ReferencePart asAttribReferencePart()
Returns this object since this is already an attrib reference part. Overrides HereReferencePart.asAttribReferencePart.

Overrides:
asAttribReferencePart in class HereReferencePart
Returns:
this part

toString

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

Overrides:
toString in class HereReferencePart
Returns:
stringified reference part

toString

public java.lang.String toString(int index)
Return a string which is a representation of the reference part in a reference in the index position given.

Overrides:
toString in class HereReferencePart
Parameters:
index - the position in the reference
Returns:
the representation

hashCode

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

Overrides:
hashCode in class HereReferencePart
Returns:
hash code for part

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

Overrides:
resolve in class HereReferencePart
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

Overrides:
resolve in class HereReferencePart
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