Package org.globus.gsi
Class X509ExtensionSet
- java.lang.Object
-
- org.globus.gsi.X509ExtensionSet
-
public class X509ExtensionSet extends java.lang.Object
Represents a set of X.509 extensions.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Hashtable
extensions
private static I18n
i18n
-
Constructor Summary
Constructors Constructor Description X509ExtensionSet()
Creates an empty X509ExtensionSet object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description X509Extension
add(X509Extension extension)
Adds a X509Extension object to this set.void
clear()
Removes all extensions from the set.X509Extension
get(java.lang.String oid)
Retrieves X509Extension by given oid.boolean
isEmpty()
Returns if the set is empty.java.util.Set
oidSet()
Returns a set view of the OIDs of the extensions contained in this extension set.X509Extension
remove(java.lang.String oid)
Removes X509Extension by given oid.int
size()
Returns the size of the set.
-
-
-
Field Detail
-
i18n
private static I18n i18n
-
extensions
private java.util.Hashtable extensions
-
-
Method Detail
-
add
public X509Extension add(X509Extension extension)
Adds a X509Extension object to this set.- Parameters:
extension
- the extension to add- Returns:
- an extension that was removed with the same oid as the new extension. Null, if none existed before.
-
get
public X509Extension get(java.lang.String oid)
Retrieves X509Extension by given oid.- Parameters:
oid
- the oid of the extension to retrieve.- Returns:
- the extension with the specified oid. Can be null if there is no extension with such oid.
-
remove
public X509Extension remove(java.lang.String oid)
Removes X509Extension by given oid.- Parameters:
oid
- the oid of the extension to remove.- Returns:
- extension that was removed. Null, if extension with the specified oid does not exist in this set.
-
size
public int size()
Returns the size of the set.- Returns:
- the size of the set.
-
isEmpty
public boolean isEmpty()
Returns if the set is empty.- Returns:
- true if the set if empty, false otherwise.
-
clear
public void clear()
Removes all extensions from the set.
-
oidSet
public java.util.Set oidSet()
Returns a set view of the OIDs of the extensions contained in this extension set.- Returns:
- the set with oids.
-
-