|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--spki.BaseObj
Top-level spki abstract class.
all classes in spki package extend from this abstract class.
| Field Summary | |
private static String |
__ME
This class's full name. |
private boolean |
cache_sexp
Is S-Expression caching enabled? true by default. |
private SExpression |
cached_sexp
Cached S-Expression of this object. |
static String |
DEFAULT_HASH_ALG
Default hash algorithm (sha1). |
private boolean |
locked
is this object immutable? false by default. |
static String |
SEXP_NAME
This class S-Expression type name, used by toSExpression() and other methods. |
| Constructor Summary | |
protected |
BaseObj()
Default constructor. |
protected |
BaseObj(SExpression sexp)
Create an immutable SPKI object from an S-Expression. |
| Method Summary | |
void |
disableSExpressionCaching()
Disable caching of SExpression. |
void |
enableSExpressionCaching()
Enable caching of SExpression given by the constructor or built by a called to the toSExpression() method. |
static String |
extractHashAlgId(String id)
Extracts the hash-alg-id from a SPKI sig-alg-id. |
protected SExpression |
getCachedSExpression()
Get this object's cached SExpression list. |
boolean |
isLocked()
See if this object is locked, i.e immutable. |
static boolean |
isSListOfType(SExpression sexp,
String type,
boolean doException)
Checks that an SExpression is both a list and of the given type. |
void |
lock()
Make this object immutable. |
static String |
providerToSPKI(String id)
Converts a [I]JCA provider string to a SPKI sig-alg-id. |
protected void |
setCachedSExpression(SExpression sexp)
Cache this object's SExpression list if caching is enabled and a) this object is not immutable or b) the cache is still empty. |
static String |
spkiToProvider(String id)
Converts a SPKI sig-alg-id to the [I]JCL provider string. |
abstract SExpression |
toSExpression()
Build an SExpression representing this object. |
String |
toString()
Return this object as a string, or null. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private static final String __ME
public static final String SEXP_NAME
toSExpression()public static final String DEFAULT_HASH_ALG
private boolean cache_sexp
enableSExpressionCaching(),
disableSExpressionCaching()private SExpression cached_sexp
setCachedSExpression(SExpression),
getCachedSExpression()private boolean locked
lock(),
isLocked()| Constructor Detail |
protected BaseObj()
protected BaseObj(SExpression sexp)
throws ParseException,
SPKIException
sexp - SExpression object containing existing SPKI object.| Method Detail |
public String toString()
toSExpression()public final void lock()
SPKIObject.isLocked()public final boolean isLocked()
SPKIObject.lock()
public abstract SExpression toSExpression()
throws SPKIException
public static final boolean isSListOfType(SExpression sexp,
String type,
boolean doException)
throws SPKIException
sexp - SExpression to checktype - String containing the type to check fordoException - true if this method is allowed to throw
exceptions when matching fails, false if the caller wants to
handle it herself (in that case, check the return value).public static final String extractHashAlgId(String id)
public static final String spkiToProvider(String id)
public static final String providerToSPKI(String id)
public final void enableSExpressionCaching()
disableSExpressionCaching(),
BaseObj(SExpression),
toSExpression(),
setCachedSExpression(SExpression),
getCachedSExpression()public final void disableSExpressionCaching()
enableSExpressionCaching(),
setCachedSExpression(SExpression),
getCachedSExpression()protected final void setCachedSExpression(SExpression sexp)
sexp - the SExpression to be cached.enableSExpressionCaching(),
disableSExpressionCaching(),
getCachedSExpression()protected final SExpression getCachedSExpression()
enableSExpressionCaching(),
disableSExpressionCaching(),
setCachedSExpression(SExpression)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||