org.openxri.pipeline.stages
Class AddRandomCanonicalIDStage
java.lang.Object
org.openxri.pipeline.stages.AbstractStage
org.openxri.pipeline.stages.AddRandomCanonicalIDStage
- All Implemented Interfaces:
- java.io.Serializable, Stage
public class AddRandomCanonicalIDStage
- extends AbstractStage
A stage that adds a element to the XRD.
The CanonicalID is constructed from the parent authority's CanonicalID plus a random persistent
subsegment of the form !xxxx.xxxx.xxxx.xxxx
Parameters for the stage's configuration:
(none)
Recommended pipeline(s) for this stage:
CREATE
- Author:
- =peacekeeper
- See Also:
- Serialized Form
|
Method Summary |
XRD |
execute(Store store,
XRD xrd,
XRISegment segment,
Authority parentAuthority,
java.lang.String subSegmentName,
Authority authority,
boolean isCreate)
Called as part of executing a pipeline. |
void |
init()
A stage is constructed by the PipelineRegistry by passing a Properties object
to its constructor and then calling this init() method. |
static java.lang.String |
randomCanonicalIDString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AddRandomCanonicalIDStage
public AddRandomCanonicalIDStage(java.util.Properties properties)
init
public void init()
throws java.lang.Exception
- Description copied from interface:
Stage
- A stage is constructed by the PipelineRegistry by passing a Properties object
to its constructor and then calling this init() method.
- Throws:
java.lang.Exception
execute
public XRD execute(Store store,
XRD xrd,
XRISegment segment,
Authority parentAuthority,
java.lang.String subSegmentName,
Authority authority,
boolean isCreate)
throws StageException
- Description copied from interface:
Stage
- Called as part of executing a pipeline.
- Parameters:
store - The store from which the authorities were retrieved.xrd - A XRD as it currently looks like on the pipeline. The stage is free to modify and return it in any way.segment - The XRI segment that resolves to the XRD being processed.parentAuthority - The parent authority, i.e. the authority describing the XRD.subSegmentName - The name of the subsegment that connects the two authorities.authority - The authority, i.e. the authority described by the XRD.isCreate - Whether this stage is execute as part of a CREATE pipeline.
- Returns:
- The XRD that is passed on to the next stage of the pipeline.
- Throws:
StageException
randomCanonicalIDString
public static java.lang.String randomCanonicalIDString()
Copyright © 2005-2010. All Rights Reserved.