|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Dictionary<K,V> java.util.Hashtable<String,String> com.bea.p13n.security.management.credentials.MemoryCredentialEntry
public class MemoryCredentialEntry
This class is an in-memory-persistence of a credential entry. It should be served as base class of other persistence implementation
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.bea.p13n.security.management.credentials.CredentialEntry |
---|
CredentialEntry.EntryType |
Constructor Summary | |
---|---|
protected |
MemoryCredentialEntry(String entryName,
CredentialEntry.EntryType type,
Scope scope,
String description,
String bindingResourceId,
String owner)
Construct a credential entry to be persisted to storage |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
String |
getAttribute(String name)
Get named credential metadata value |
Map<String,String> |
getAttributes()
Get a copy of all credential metadata |
Credential |
getCredential()
Get credential |
String |
getDescription()
Get optional description |
String |
getName()
Get entry name |
String |
getOwnerName()
|
Scope |
getScope()
Get visibility scope of the credential entry |
CredentialEntry.EntryType |
getType()
Get binding type of this entry |
int |
hashCode()
|
void |
removeAttribute(String name)
Remove named credential metadata |
void |
setAttribute(String name,
String value)
Set a credential metadata If value is null, it equals to removeAttribute(String) |
void |
setCredential(Credential c)
Set credential into this entry |
void |
setDescription(String newDescription)
Set a new description |
String |
toString()
|
Methods inherited from class java.util.Hashtable |
---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, put, putAll, rehash, remove, size, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected MemoryCredentialEntry(String entryName, CredentialEntry.EntryType type, Scope scope, String description, String bindingResourceId, String owner)
entryName
- the name of the entrytype
- a predeinfed EntryTypescope
- visibility of the entry to createdescription
- optional description of the entrybindingResourceId
- resource name bind to the entryowner
- the name of the user who created the entryMethod Detail |
---|
public String getName()
getName
in interface CredentialEntry
public CredentialEntry.EntryType getType()
getType
in interface CredentialEntry
public Scope getScope()
getScope
in interface CredentialEntry
public String getDescription()
getDescription
in interface CredentialEntry
null
if not setpublic void setDescription(String newDescription)
setDescription
in interface CredentialEntry
newDescription
- a new descriptionpublic Credential getCredential()
getCredential
in interface CredentialEntry
public void setCredential(Credential c)
setCredential
in interface CredentialEntry
c
- credential to be setpublic String getAttribute(String name)
getAttribute
in interface CredentialEntry
name
- the name of credential metadata
public void setAttribute(String name, String value)
removeAttribute(String)
setAttribute
in interface CredentialEntry
name
- the name of credential metadatavalue
- the value of credential metadatapublic void removeAttribute(String name)
removeAttribute
in interface CredentialEntry
name
- the name of credential metadata to be removepublic Map<String,String> getAttributes()
NOTE: The returned map is a shallow copy of all metadata. Using Map.put() on returned object only change value locally.
It has no effect as setAttribute(String, String)
does.
getAttributes
in interface CredentialEntry
public String getOwnerName()
public boolean equals(Object o)
equals
in interface Map<String,String>
equals
in class Hashtable<String,String>
public int hashCode()
hashCode
in interface Map<String,String>
hashCode
in class Hashtable<String,String>
public String toString()
toString
in class Hashtable<String,String>
|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |