Vordel SDK

com.vordel.es.util
Class ShorthandKeyFinder

java.lang.Object
  extended by com.vordel.es.util.ShorthandKeyFinder

public class ShorthandKeyFinder
extends java.lang.Object


Nested Class Summary
 class ShorthandKeyFinder.SingleEntityPF
           
 
Constructor Summary
ShorthandKeyFinder(EntityStore es)
           
 
Method Summary
protected  void checkForAbsolutePath(java.lang.String shorthandKey)
           
static java.lang.String escape(java.lang.String shk)
          Escape a string to be used as a shorthand key
static java.lang.String escapeFieldValue(java.lang.String val)
          Escape a field for use when assembling a shorthand query string.
 java.util.List<Entity> getEntities(ESPK currPK, java.lang.String shorthandKey)
           
 java.util.List<Entity> getEntities(java.lang.String shorthandKey)
           
 Entity getEntity(ESPK currPK, java.lang.String shorthandKey)
           
 Entity getEntity(java.lang.String shorthandKey)
          Getting an Entity using a 'shorthand' key.
 EntityStore getEntityStore()
           
 java.util.List<Field> getFieldData(EntityType type, java.lang.String shk)
           
 EntityType getType(java.lang.String shk)
           
static void main(java.lang.String[] args)
           
 void setEntityStore(EntityStore es)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShorthandKeyFinder

public ShorthandKeyFinder(EntityStore es)
Method Detail

setEntityStore

public void setEntityStore(EntityStore es)

getEntityStore

public EntityStore getEntityStore()

getEntity

public Entity getEntity(java.lang.String shorthandKey)
                 throws EntityStoreException
Getting an Entity using a 'shorthand' key.

Parameters:
shorthandKey - A path referencing an Entity in the specified store.
Returns:
The first Entity referenced by the shorthand key, or null if a matching Entity can't be found.
Throws:
EntityStoreException

checkForAbsolutePath

protected void checkForAbsolutePath(java.lang.String shorthandKey)

getEntity

public Entity getEntity(ESPK currPK,
                        java.lang.String shorthandKey)
                 throws EntityStoreException
Throws:
EntityStoreException

getEntities

public java.util.List<Entity> getEntities(ESPK currPK,
                                          java.lang.String shorthandKey)
                                   throws EntityStoreException
Throws:
EntityStoreException

getEntities

public java.util.List<Entity> getEntities(java.lang.String shorthandKey)
                                   throws EntityStoreException
Throws:
EntityStoreException

getType

public EntityType getType(java.lang.String shk)
                   throws EntityStoreException
Throws:
EntityStoreException

getFieldData

public java.util.List<Field> getFieldData(EntityType type,
                                          java.lang.String shk)
                                   throws EntityStoreException
Throws:
EntityStoreException

escape

public static java.lang.String escape(java.lang.String shk)
Escape a string to be used as a shorthand key

Parameters:
shk -
Returns:

escapeFieldValue

public static java.lang.String escapeFieldValue(java.lang.String val)
Escape a field for use when assembling a shorthand query string. This will escape '/' and ',' characters, which are used as shorthand key delimiters. For example, you may be assembling a certificate alias whose dname contains commas:
 String alias = "CN=www.amazon.com, O=Amazon.com Inc., L=Seattle, ST=Washington, C=US";
 String shk = "[Certificate]dname=" + Util.escapeFieldValue(alias);
 System.out.println(shk);
 
yields the escaped string:
 [Certificate]dname=CN=www.amazon.com\, O=Amazon.com Inc.\, L=Seattle\, ST=Washington\, C=US
 

Parameters:
val - The field value to escape.
Returns:

main

public static final void main(java.lang.String[] args)

Vordel SDK


This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel