ibrokerkit.iname4java.store.impl.grs
Class GrsXriStore

java.lang.Object
  extended by ibrokerkit.iname4java.store.impl.openxri.OpenxriXriStore
      extended by ibrokerkit.iname4java.store.impl.grs.GrsXriStore
All Implemented Interfaces:
XriStore

public class GrsXriStore
extends OpenxriXriStore

The GrsXriStore is used for creating, retrieving and managing i-names in the GRS. This extends OpenxriXriStore, i.e. changes to i-names in the GRS also affect OpenXRI.


Field Summary
 
Fields inherited from class ibrokerkit.iname4java.store.impl.openxri.OpenxriXriStore
openxriStore
 
Constructor Summary
GrsXriStore(org.openxri.store.Store openxriStore, EppTools eppTools)
           
 
Method Summary
 void deleteXri(Xri xri)
          This deletes an i-name.
 boolean existsXri(Xri parentXri, java.lang.String localName)
          Checks if a given i-name exists already.
 java.lang.String findUserIdentifier(java.lang.String xri)
          Finds the user identifier associated with an i-name.
 Xri findXri(java.lang.String xri)
          Finds an i-name by string, e.g.
 Xri findXriByGrsAuthorityId(java.lang.String grsAuthorityId)
          Finds an i-name by its OpenXRI authority ID.
 long getAuthorityCount()
          Returns the number of i-name authorities in the XriStore.
 long getXriCount()
          Returns the number of i-names in the XriStore.
 java.util.List<Xri> listRootXris()
          Lists all root i-names in the XriStore.
 java.util.List<Xri> listUserXris(java.lang.String userIdentifier)
          Lists all i-names associated with a given user identifier.
 java.util.List<Xri> listXris()
          Lists all i-names in the XriStore.
 Xri registerXri(Xri parentXri, java.lang.String localName, XriData xriData, int years)
          Register a new i-name with a new i-name authority.
 Xri registerXriSynonym(Xri parentXri, java.lang.String localName, Xri xri, XriData xriData, int years)
          Register a new i-name with an already existing i-name authority (synonyms).
 java.util.Calendar renewXri(Xri xri, int years)
          This renews an i-name.
 void transferXriInCanceled(Xri xri)
          Tells the XriStore that a top-level i-name Transfer IN has been canceled.
 void transferXriInComplete(Xri xri)
          Tells the XriStore that a top-level i-name Transfer IN has been completed.
 Xri transferXriInRequest(java.lang.String localName, XriData xriData)
          Issues a Transfer IN request for a top-level i-name.
 void transferXriOutCanceled(Xri xri)
          Tells the XriStore that a top-level i-name Transfer OUT has been canceled.
 void transferXriOutComplete(Xri xri)
          Tells the XriStore that a top-level i-name Transfer OUT has been completed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrsXriStore

public GrsXriStore(org.openxri.store.Store openxriStore,
                   EppTools eppTools)
Method Detail

existsXri

public boolean existsXri(Xri parentXri,
                         java.lang.String localName)
                  throws XriStoreException
Description copied from interface: XriStore
Checks if a given i-name exists already.

Specified by:
existsXri in interface XriStore
Overrides:
existsXri in class OpenxriXriStore
Parameters:
parentXri - The parent i-name. In the case of top-level i-names, this is null.
localName - The i-name to check for. In the case of top-level i-names, this is the i-name itself (e.g. "=myname"). In the case of community i-names, this is the subsegment (e.g. "*myname").
Returns:
True, if the i-name exists already.
Throws:
XriStoreException

registerXri

public Xri registerXri(Xri parentXri,
                       java.lang.String localName,
                       XriData xriData,
                       int years)
                throws XriStoreException
Description copied from interface: XriStore
Register a new i-name with a new i-name authority.

Specified by:
registerXri in interface XriStore
Overrides:
registerXri in class OpenxriXriStore
Parameters:
parentXri - The parent i-name. In the case of top-level i-names, this is null.
localName - The i-name to register. In the case of top-level i-names, this is the i-name itself (e.g. "=myname"). In the case of community i-names, this is the subsegment (e.g. "*myname").
xriData - The user data necessary to register the i-name.
years - The number of years for which to register the i-name. This only applies to top-level i-names.
Returns:
The newly created i-name.
Throws:
XriStoreException

registerXriSynonym

public Xri registerXriSynonym(Xri parentXri,
                              java.lang.String localName,
                              Xri xri,
                              XriData xriData,
                              int years)
                       throws XriStoreException
Description copied from interface: XriStore
Register a new i-name with an already existing i-name authority (synonyms).

Specified by:
registerXriSynonym in interface XriStore
Overrides:
registerXriSynonym in class OpenxriXriStore
Parameters:
parentXri - The parent i-name. In the case of top-level i-names, this is null.
localName - The i-name to register. In the case of top-level i-names, this is the i-name itself (e.g. "=myname"). In the case of community i-names, this is the subsegment (e.g. "*myname").
xri - The already existing i-name. This should have the same parent authority as the i-name that is being registered.
xriData - The user data necessary to register the i-name.
years - The number of years for which to register the i-name. This only applies to top-level i-names.
Returns:
The newly created i-name.
Throws:
XriStoreException

transferXriInRequest

public Xri transferXriInRequest(java.lang.String localName,
                                XriData xriData)
                         throws XriStoreException
Description copied from interface: XriStore
Issues a Transfer IN request for a top-level i-name. This creates a provisional i-name in the XriStore, which will be updated when the Transfer IN is completed.

Specified by:
transferXriInRequest in interface XriStore
Overrides:
transferXriInRequest in class OpenxriXriStore
Parameters:
localName - The "local name" of the i-name. This is the i-name itself, e.g. =myname.
xriData - The user data necessary to transfer the i-name.
Throws:
XriStoreException

transferXriInComplete

public void transferXriInComplete(Xri xri)
                           throws XriStoreException
Description copied from interface: XriStore
Tells the XriStore that a top-level i-name Transfer IN has been completed. This updates the i-name appropriately.

Specified by:
transferXriInComplete in interface XriStore
Overrides:
transferXriInComplete in class OpenxriXriStore
Parameters:
xri - The i-name Transfer IN which has been completed.
Throws:
XriStoreException

transferXriInCanceled

public void transferXriInCanceled(Xri xri)
                           throws XriStoreException
Description copied from interface: XriStore
Tells the XriStore that a top-level i-name Transfer IN has been canceled. This updates the i-name appropriately.

Specified by:
transferXriInCanceled in interface XriStore
Overrides:
transferXriInCanceled in class OpenxriXriStore
Parameters:
xri - The i-name Transfer IN which has been canceled.
Throws:
XriStoreException

transferXriOutComplete

public void transferXriOutComplete(Xri xri)
                            throws XriStoreException
Description copied from interface: XriStore
Tells the XriStore that a top-level i-name Transfer OUT has been completed. This updates the i-name appropriately.

Specified by:
transferXriOutComplete in interface XriStore
Overrides:
transferXriOutComplete in class OpenxriXriStore
Parameters:
xri - The i-name Transfer OUT which has been completed.
Throws:
XriStoreException

transferXriOutCanceled

public void transferXriOutCanceled(Xri xri)
                            throws XriStoreException
Description copied from interface: XriStore
Tells the XriStore that a top-level i-name Transfer OUT has been canceled. This updates the i-name appropriately.

Specified by:
transferXriOutCanceled in interface XriStore
Overrides:
transferXriOutCanceled in class OpenxriXriStore
Parameters:
xri - The i-name Transfer OUT which has been canceled.
Throws:
XriStoreException

renewXri

public java.util.Calendar renewXri(Xri xri,
                                   int years)
                            throws XriStoreException
Description copied from interface: XriStore
This renews an i-name. Only top-level i-names can be renewed. Both the i-name and associated i-number get renewed in the GRS. In order to renew synonyms of an i-name, this method must be called on those synonym i-name separately.

Specified by:
renewXri in interface XriStore
Overrides:
renewXri in class OpenxriXriStore
Parameters:
xri - The i-name to renew.
years - The number of years by which to renew the i-name and i-number.
Returns:
The new expiration date of the i-name.
Throws:
XriStoreException

deleteXri

public void deleteXri(Xri xri)
               throws XriStoreException
Description copied from interface: XriStore
This deletes an i-name. Only community i-names can be deleted.

Specified by:
deleteXri in interface XriStore
Overrides:
deleteXri in class OpenxriXriStore
Throws:
XriStoreException

listXris

public java.util.List<Xri> listXris()
                             throws XriStoreException
Description copied from interface: XriStore
Lists all i-names in the XriStore.

Specified by:
listXris in interface XriStore
Overrides:
listXris in class OpenxriXriStore
Throws:
XriStoreException

listRootXris

public java.util.List<Xri> listRootXris()
                                 throws XriStoreException
Description copied from interface: XriStore
Lists all root i-names in the XriStore. A root i-name is one that does not have a parent authority. This can be a top-level i-name or the namespace of a community registry.

Specified by:
listRootXris in interface XriStore
Overrides:
listRootXris in class OpenxriXriStore
Throws:
XriStoreException

listUserXris

public java.util.List<Xri> listUserXris(java.lang.String userIdentifier)
                                 throws XriStoreException
Description copied from interface: XriStore
Lists all i-names associated with a given user identifier.

Specified by:
listUserXris in interface XriStore
Overrides:
listUserXris in class OpenxriXriStore
Throws:
XriStoreException

findXri

public Xri findXri(java.lang.String xri)
            throws XriStoreException
Description copied from interface: XriStore
Finds an i-name by string, e.g. =myname or =mycommunity*myname

Specified by:
findXri in interface XriStore
Overrides:
findXri in class OpenxriXriStore
Throws:
XriStoreException

findXriByGrsAuthorityId

public Xri findXriByGrsAuthorityId(java.lang.String grsAuthorityId)
                            throws XriStoreException
Description copied from interface: XriStore
Finds an i-name by its OpenXRI authority ID.

Specified by:
findXriByGrsAuthorityId in interface XriStore
Overrides:
findXriByGrsAuthorityId in class OpenxriXriStore
Throws:
XriStoreException

findUserIdentifier

public java.lang.String findUserIdentifier(java.lang.String xri)
                                    throws XriStoreException
Description copied from interface: XriStore
Finds the user identifier associated with an i-name.

Specified by:
findUserIdentifier in interface XriStore
Overrides:
findUserIdentifier in class OpenxriXriStore
Throws:
XriStoreException

getXriCount

public long getXriCount()
                 throws XriStoreException
Description copied from interface: XriStore
Returns the number of i-names in the XriStore.

Specified by:
getXriCount in interface XriStore
Overrides:
getXriCount in class OpenxriXriStore
Throws:
XriStoreException

getAuthorityCount

public long getAuthorityCount()
                       throws XriStoreException
Description copied from interface: XriStore
Returns the number of i-name authorities in the XriStore.

Specified by:
getAuthorityCount in interface XriStore
Overrides:
getAuthorityCount in class OpenxriXriStore
Throws:
XriStoreException


Copyright © 2009. All Rights Reserved.