Class AbstractSAMLArtifact
java.lang.Object
org.opensaml.saml.common.binding.artifact.AbstractSAMLArtifact
- All Implemented Interfaces:
SAMLArtifact
- Direct Known Subclasses:
AbstractSAML1Artifact
,AbstractSAML2Artifact
Base class for SAML artifacts.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the Base64 encoded artifact.boolean
byte[]
Gets the bytes for the artifact.abstract byte[]
Gets the artifact bytes minus the type code.byte[]
Gets the 2 byte type code for this artifact.int
hashCode()
Gets the hex encoded artifact.protected void
setTypeCode
(byte[] newTypeCode) Sets the 2 byte type code for this artifact.toString()
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
typeCode
private byte[] typeCode2 byte artifact type code.
-
-
Constructor Details
-
AbstractSAMLArtifact
protected AbstractSAMLArtifact(@Nonnull byte[] code) Constructor.- Parameters:
code
- the artifact type code- Throws:
IllegalArgumentException
- thrown if the given type code is not two bytes in length
-
-
Method Details
-
getArtifactBytes
@Nonnull public byte[] getArtifactBytes()Gets the bytes for the artifact.- Specified by:
getArtifactBytes
in interfaceSAMLArtifact
- Returns:
- the bytes for the artifact
-
getTypeCode
@Nonnull public byte[] getTypeCode()Gets the 2 byte type code for this artifact.- Specified by:
getTypeCode
in interfaceSAMLArtifact
- Returns:
- the type code for this artifact
-
setTypeCode
protected void setTypeCode(@Nonnull byte[] newTypeCode) Sets the 2 byte type code for this artifact.- Parameters:
newTypeCode
- 2 byte type code for this artifact
-
getRemainingArtifact
@Nonnull public abstract byte[] getRemainingArtifact()Gets the artifact bytes minus the type code.- Returns:
- artifact bytes minus the type code
-
base64Encode
Gets the Base64 encoded artifact.- Returns:
- Base64 encoded artifact.
- Throws:
EncodingException
- if the artifact could not be base64 encoded.
-
hexEncode
Gets the hex encoded artifact.- Returns:
- hex encoded artifact
-
equals
-
hashCode
public int hashCode() -
toString
-