Class FixedStringIdentifierGenerationStrategy
java.lang.Object
net.shibboleth.utilities.java.support.security.impl.FixedStringIdentifierGenerationStrategy
- All Implemented Interfaces:
IdentifierGenerationStrategy
public class FixedStringIdentifierGenerationStrategy
extends Object
implements IdentifierGenerationStrategy
Identifier generation strategy using a fixed identifier string.
This can be used in circumstances where there is no requirement that identifiers be
different from each other.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
Fixed identifier to use for all invocations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerates an identifier guaranteed to be XML ID safe.generateIdentifier
(boolean xmlSafe) Generates an identifier.
-
Field Details
-
identifier
Fixed identifier to use for all invocations.
-
-
Constructor Details
-
FixedStringIdentifierGenerationStrategy
Constructor.- Parameters:
id
- fixed identifier to use for all invocations.
-
-
Method Details
-
generateIdentifier
Generates an identifier guaranteed to be XML ID safe.- Specified by:
generateIdentifier
in interfaceIdentifierGenerationStrategy
- Returns:
- the identifier
-
generateIdentifier
Generates an identifier.- Specified by:
generateIdentifier
in interfaceIdentifierGenerationStrategy
- Parameters:
xmlSafe
- true iff the result must be XML ID safe- Returns:
- the identifier
-