ibrokerkit.iname4java.store
Interface XriStore

All Known Implementing Classes:
GrsXriStore, OpenxriXriStore

public interface XriStore

The XriStore is used for creating, retrieving and managing i-names.


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.
 

Method Detail

existsXri

boolean existsXri(Xri parentXri,
                  java.lang.String localName)
                  throws XriStoreException
Checks if a given i-name exists already.

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

Xri registerXri(Xri parentXri,
                java.lang.String localName,
                XriData xriData,
                int years)
                throws XriStoreException
Register a new i-name with a new i-name authority.

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

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

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

Xri transferXriInRequest(java.lang.String localName,
                         XriData xriData)
                         throws XriStoreException
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.

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

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

Parameters:
xri - The i-name Transfer IN which has been completed.
Throws:
XriStoreException

transferXriInCanceled

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

Parameters:
xri - The i-name Transfer IN which has been canceled.
Throws:
XriStoreException

transferXriOutComplete

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

Parameters:
xri - The i-name Transfer OUT which has been completed.
Throws:
XriStoreException

transferXriOutCanceled

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

Parameters:
xri - The i-name Transfer OUT which has been canceled.
Throws:
XriStoreException

renewXri

java.util.Calendar renewXri(Xri xri,
                            int years)
                            throws XriStoreException
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.

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

void deleteXri(Xri xri)
               throws XriStoreException
This deletes an i-name. Only community i-names can be deleted.

Throws:
XriStoreException

listXris

java.util.List<Xri> listXris()
                             throws XriStoreException
Lists all i-names in the XriStore.

Throws:
XriStoreException

listRootXris

java.util.List<Xri> listRootXris()
                                 throws XriStoreException
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.

Throws:
XriStoreException

listUserXris

java.util.List<Xri> listUserXris(java.lang.String userIdentifier)
                                 throws XriStoreException
Lists all i-names associated with a given user identifier.

Throws:
XriStoreException

findXri

Xri findXri(java.lang.String xri)
            throws XriStoreException
Finds an i-name by string, e.g. =myname or =mycommunity*myname

Throws:
XriStoreException

findXriByGrsAuthorityId

Xri findXriByGrsAuthorityId(java.lang.String grsAuthorityId)
                            throws XriStoreException
Finds an i-name by its OpenXRI authority ID.

Throws:
XriStoreException

findUserIdentifier

java.lang.String findUserIdentifier(java.lang.String xri)
                                    throws XriStoreException
Finds the user identifier associated with an i-name.

Throws:
XriStoreException

getXriCount

long getXriCount()
                 throws XriStoreException
Returns the number of i-names in the XriStore.

Throws:
XriStoreException

getAuthorityCount

long getAuthorityCount()
                       throws XriStoreException
Returns the number of i-name authorities in the XriStore.

Throws:
XriStoreException


Copyright © 2009. All Rights Reserved.