Class Domain
- java.lang.Object
-
- com.cloudbees.plugins.credentials.domains.Domain
-
- All Implemented Interfaces:
Serializable
public class Domain extends Object implements Serializable
A domain, within which credentials are common. For example a company may have a single sign-on domain where a bunch of web applications, source control systems, issue trackers, etc all share the same username/password backing database.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Domain(String name, String description, List<DomainSpecification> specifications)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getDescription()
Returns the description of this domain.String
getName()
Returns the name of the domain.List<DomainSpecification>
getSpecifications()
Returns theDomainSpecification
s for thisDomain
.String
getUrl()
Return the store relative URL of this domain.static Domain
global()
Returns the special "global" domain.int
hashCode()
boolean
isGlobal()
Tests if this is theglobal()
domain.Domain
resolve()
Resolve the correct domain instance.boolean
test(DomainRequirement... requirements)
boolean
test(List<DomainRequirement> requirements)
-
-
-
Constructor Detail
-
Domain
@DataBoundConstructor public Domain(String name, String description, List<DomainSpecification> specifications)
-
-
Method Detail
-
global
@NonNull public static Domain global()
Returns the special "global" domain.- Returns:
- the special "global" domain.
-
resolve
public Domain resolve()
Resolve the correct domain instance.- Returns:
- the correct domain instance (i.e. replaces the global domain with
global()
.
-
getDescription
@CheckForNull public String getDescription()
Returns the description of this domain.- Returns:
- the description of this domain.
-
getSpecifications
@NonNull public List<DomainSpecification> getSpecifications()
Returns theDomainSpecification
s for thisDomain
.- Returns:
- the
DomainSpecification
s for thisDomain
.
-
getName
@CheckForNull public String getName()
Returns the name of the domain.- Returns:
- the name of the domain.
-
getUrl
public String getUrl()
Return the store relative URL of this domain.- Returns:
- the store relative URL of this domain.
-
isGlobal
public boolean isGlobal()
Tests if this is theglobal()
domain.- Returns:
true
if and only if this is theglobal()
domain.- Since:
- 2.0
-
test
public boolean test(DomainRequirement... requirements)
- Parameters:
requirements
- theDomainRequirement
s to test.- Returns:
true
if and only if the suppliedDomainRequirement
s are a match for thisDomain
.
-
test
public boolean test(@NonNull List<DomainRequirement> requirements)
- Parameters:
requirements
- theDomainRequirement
s to test.- Returns:
true
if and only if the suppliedDomainRequirement
s are a match for thisDomain
.
-
-