|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensaml.artifact.SAMLArtifact
public abstract class SAMLArtifact
The SAMLArtifact abstract class is a partial
implementation of the Artifact interface.
In particular, this class provides a final
implementation of the Artifact.TypeCode
interface. To complete the implementation, a subclass
must implement the
Artifact.RemainingArtifact
and Artifact.Parser interfaces.
A SAML artifact has three components: 1) a two-byte type code, 2) a precise definition of "remaining artifact," and 3) an encoding scheme. The encoding is fixed (base64) whereas the type code and "remaining artifact" vary from artifact to artifact.
The formal definition of a SAML artifact is given by the following productions:
SAMLArtifact := base64(TypeCode RemainingArtifact) TypeCode := Byte1 Byte2
An implementation must specify a type code value
and provide a definition for RemainingArtifact
to complete the grammar.
Subclasses of SAMLArtifact
must adhere to certain naming conventions.
First of all, the name of the subclass is always
"SAMLArtifactType" followed by the hex encoding of the type
code. For instance, a subclass that implements a type
0x0001 artifact is called SAMLArtifactType0001.
Moreover, each class must contain an
implementation of Artifact.Parser called
(simply) Parser. In this way, the
SAMLArtifact.TypeCode.getParser() method can locate
the appropriate parser on-demand (based on type code).
| Nested Class Summary | |
|---|---|
static class |
SAMLArtifact.Parser
Subclasses of SAMLArtifact must extend this
(trivial) abstract class or implement
Artifact.Parser from scratch. |
static class |
SAMLArtifact.RemainingArtifact
Subclasses of SAMLArtifact must extend this abstract
class or implement Artifact.RemainingArtifact from
scratch. |
static class |
SAMLArtifact.TypeCode
A TypeCode is an arbitrary two-byte sequence. |
| Field Summary | |
|---|---|
protected Artifact.RemainingArtifact |
remainingArtifact
The remainingArtifact property
of this SAMLArtifact object. |
protected Artifact.TypeCode |
typeCode
The typeCode property
of this SAMLArtifact object. |
| Fields inherited from interface org.opensaml.artifact.SAMLArtifactChecking |
|---|
HANDLE_LENGTH, IDENTIFIER_LENGTH, INVALID_ARG_ERROR_MSG, LENGTH_ERROR_MSG, NULL_ARG_ERROR_MSG, PARSE_ERROR_MSG, PARSER_ERROR_MSG, TYPE_CODE_ERROR_MSG |
| Constructor Summary | |
|---|---|
protected |
SAMLArtifact()
|
| Method Summary | |
|---|---|
static void |
checkHandleArg(byte[] handle)
|
static void |
checkIdentifierArg(byte[] identifier)
|
static void |
checkNullArg(Object obj)
|
String |
encode()
Encode this SAMLArtifact object using the
base64 encoding method. |
boolean |
equals(Object o)
Equate two sequences of bytes. |
byte[] |
getBytes()
Get the actual bytes of this sequence of bytes. |
Artifact.RemainingArtifact |
getRemainingArtifact()
Get the remainingArtifact property of this
Artifact object. |
Artifact.TypeCode |
getTypeCode()
Get the typeCode property of this
Artifact object. |
static Artifact.TypeCode |
getTypeCode(String s)
Pre-parses an encoded artifact. |
int |
hashCode()
Compute the hashcode of this sequences of bytes. |
int |
size()
Get the size of this sequence of bytes. |
String |
toString()
Encode this SAMLArtifact object using a
simple hex encoding method. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Artifact.TypeCode typeCode
typeCode property
of this SAMLArtifact object.
protected Artifact.RemainingArtifact remainingArtifact
remainingArtifact property
of this SAMLArtifact object.
| Constructor Detail |
|---|
protected SAMLArtifact()
| Method Detail |
|---|
public Artifact.TypeCode getTypeCode()
ArtifacttypeCode property of this
Artifact object.
getTypeCode in interface ArtifacttypeCode propertypublic Artifact.RemainingArtifact getRemainingArtifact()
ArtifactremainingArtifact property of this
Artifact object.
getRemainingArtifact in interface ArtifactremainingArtifact propertypublic int size()
ByteSizedSequence
size in interface ByteSizedSequencepublic byte[] getBytes()
ByteSizedSequence
getBytes in interface ByteSizedSequencepublic String encode()
SAMLArtifact object using the
base64 encoding method.
encode in interface ArtifactBase64public String toString()
SAMLArtifact object using a
simple hex encoding method.
toString in interface ByteSizedSequencetoString in class ObjectHexpublic boolean equals(Object o)
ByteSizedSequence
equals in interface ByteSizedSequenceequals in class Objectpublic int hashCode()
ByteSizedSequence
hashCode in interface ByteSizedSequencehashCode in class Objectpublic static Artifact.TypeCode getTypeCode(String s)
SAMLArtifact.TypeCode.getParser(), for
instance.
s - the string to be parsed
public static void checkHandleArg(byte[] handle)
public static void checkIdentifierArg(byte[] identifier)
public static void checkNullArg(Object obj)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||