org.openxri.store
Interface Store

All Superinterfaces:
Component, java.io.Serializable, StoreLookup
All Known Subinterfaces:
StoreResettable
All Known Implementing Classes:
AbstractStore, DatabaseStore, NullStore

public interface Store
extends StoreLookup, Component

Author:
=chetan, =peacekeeper

Method Summary
 Authority createAuthority(XRD xrd)
          Creates an authority without associating it with a subsegment.
 SubSegment createRootSubSegment(java.lang.String name, XRD xrd)
          Creates a root subsegment (entry-point namespace to the server).
 void deleteAuthority(Authority authority)
          Deletes an authority and any subsegments registered underneath it.
 void deleteRootSubSegment(java.lang.String namespace)
          Deletes the root subsegment (namespace) associated with an authority.
 SubSegment[] listRootSubSegments()
          Lists all of the root subsegments (namespaces) on the server.
 SubSegment registerSubsegment(Authority parentAuthority, java.lang.String subSegmentName, Authority authority)
          Registers a new subsegment using an already existing authority.
 SubSegment registerSubsegment(Authority parentAuthority, java.lang.String subSegmentName, XRD xrd)
          Registers a subsegment with a new authority.
 void releaseSubSegment(SubSegment subSegment)
          Releases the descriptor information associated with a registered subsegment.
 
Methods inherited from interface org.openxri.store.StoreLookup
findRootSubSegment, findSubSegment, getSubSegmentAuthority, getSubSegmentParentAuthority, localLookup
 
Methods inherited from interface org.openxri.config.Component
getProperties, init
 

Method Detail

createRootSubSegment

SubSegment createRootSubSegment(java.lang.String name,
                                XRD xrd)
                                throws StoreException
Creates a root subsegment (entry-point namespace to the server).

Parameters:
name - The name of the new root subsegment.
xrd - The XRD of the authority associated with the root subsegment.
Throws:
StoreException

createAuthority

Authority createAuthority(XRD xrd)
                          throws StoreException
Creates an authority without associating it with a subsegment. You probably want to use registerSubsegment() instead, which creates both and authority and an associated subsegment.

Parameters:
xrd - An initial XRD that will be run through the default create pipeline and then associated with the new authority.
Throws:
StoreException

registerSubsegment

SubSegment registerSubsegment(Authority parentAuthority,
                              java.lang.String subSegmentName,
                              XRD xrd)
                              throws StoreException
Registers a subsegment with a new authority.

Parameters:
parentAuthority - The authority to register under.
subSegmentName - The name of the subsegment to register.
xrd - An initial XRD that will be run through the default create pipeline and then associated with the new authority.
Throws:
StoreException

registerSubsegment

SubSegment registerSubsegment(Authority parentAuthority,
                              java.lang.String subSegmentName,
                              Authority authority)
                              throws StoreException
Registers a new subsegment using an already existing authority.

Parameters:
parentAuthority - The authority id to register under.
subSegmentName - The name of the subsegment to register.
authority - The existing authority for the subsegment.
Throws:
StoreException

listRootSubSegments

SubSegment[] listRootSubSegments()
                                 throws StoreException
Lists all of the root subsegments (namespaces) on the server.

Throws:
StoreException

releaseSubSegment

void releaseSubSegment(SubSegment subSegment)
                       throws StoreException
Releases the descriptor information associated with a registered subsegment.

Parameters:
subSegment - The subsegment to release.
Throws:
StoreException

deleteRootSubSegment

void deleteRootSubSegment(java.lang.String namespace)
                          throws StoreException
Deletes the root subsegment (namespace) associated with an authority. Does not delete the authority itself.

Parameters:
namespace - The root subsegment (namespace) to delete.
Throws:
StoreException

deleteAuthority

void deleteAuthority(Authority authority)
                     throws StoreException
Deletes an authority and any subsegments registered underneath it. It does not delete any authorities registered for those subsegments.

Parameters:
authority - The authority to delete
Throws:
StoreException


Copyright © 2005-2012. All Rights Reserved.