@ThreadSafe
public class SAMLSchemaBuilder
extends java.lang.Object
Schemas for validating SAML 1.0, 1.1, and 2.0.
Additional schemas may be included in the resulting object by supplying their locations
to an injected SchemaBuilder object.
| Modifier and Type | Class and Description |
|---|---|
static class |
SAMLSchemaBuilder.SAML1Version
Identifies which SAML 1.x version is in use.
|
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String[] |
baseExtSchemas
Classpath relative location of SAML extension schemas.
|
private static java.lang.String[] |
baseXMLSchemas
Classpath relative location of basic XML schemas.
|
private javax.xml.validation.Schema |
cachedSchema
Cached copy of the schema produced by the builder.
|
private static java.lang.String[] |
saml10Schemas
Classpath relative location of SAML 1_0 schemas.
|
private static java.lang.String[] |
saml11Schemas
Classpath relative location of SAML 1_1 schemas.
|
private java.lang.String[] |
saml1xSchemas
Reference to SAML 1.x schemas to apply.
|
private static java.lang.String[] |
saml20Schemas
Classpath relative location of SAML 2_0 schemas.
|
private net.shibboleth.utilities.java.support.xml.SchemaBuilder |
schemaBuilder
The builder to use.
|
private static java.lang.String[] |
soapSchemas
Classpath relative location of SOAP 1_1 schemas.
|
| Constructor and Description |
|---|
SAMLSchemaBuilder(SAMLSchemaBuilder.SAML1Version ver)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
configureBuilder()
Configure the appropriate
SchemaBuilder with the right set of schemas. |
javax.xml.validation.Schema |
getSAMLSchema()
Get a schema that can validate SAML 1.x, 2.0, and all registered extensions.
|
void |
setSchemaBuilder(net.shibboleth.utilities.java.support.xml.SchemaBuilder builder)
Set a custom
SchemaBuilder to use. |
@Nonnull @NonnullElements @NotEmpty private static java.lang.String[] baseXMLSchemas
@Nonnull @NonnullElements @NotEmpty private static java.lang.String[] soapSchemas
@Nonnull @NonnullElements @NotEmpty private static java.lang.String[] saml10Schemas
@Nonnull @NonnullElements @NotEmpty private static java.lang.String[] saml11Schemas
@Nonnull @NonnullElements @NotEmpty private static java.lang.String[] saml20Schemas
@Nonnull @NonnullElements @NotEmpty private static java.lang.String[] baseExtSchemas
@Nullable private javax.xml.validation.Schema cachedSchema
@Nonnull @NonnullElements @NotEmpty private java.lang.String[] saml1xSchemas
@Nonnull private net.shibboleth.utilities.java.support.xml.SchemaBuilder schemaBuilder
public SAMLSchemaBuilder(@Nonnull
SAMLSchemaBuilder.SAML1Version ver)
A default SchemaBuilder is constructed, and injected with a
ClasspathResolver for resolving supplementary schemas.
ver - the SAML 1.x version to usepublic void setSchemaBuilder(@Nonnull
net.shibboleth.utilities.java.support.xml.SchemaBuilder builder)
SchemaBuilder to use.builder - SchemaBuilder to use@Nonnull
public javax.xml.validation.Schema getSAMLSchema()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - thrown if a schema object cannot be created@Nonnull private void configureBuilder()
SchemaBuilder with the right set of schemas.