com.elastisys.scale.commons.openstack

## Class Scope

- java.lang.Object
- - com.elastisys.scale.commons.openstack.Scope

    public class Scope
    extends Object

Authentication scope to use for authentication against version 3 of the Keystone HTTP API.

Version 3-type authentication can be done using either project scope or domain scope.

See Also:
  `AuthV3Credentials`

### Constructor Summary

Constructors
Constructor and Description
`Scope(String domainId, String projectId)` Constructs an authentication `Scope` for `AuthV3Credentials`.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object obj)`
`String` `getDomainId()`
`String` `getProjectId()`
`int` `hashCode()`
`boolean` `isDomainScoped()` Returns `true` if domain-scoped authentication is specified.
`boolean` `isProjectScoped()` Returns `true` if project-scoped authentication is specified.
`void` `validate()` Validates the configuration.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Scope

    public Scope(String domainId,
                 String projectId)

Constructs an authentication `Scope` for `AuthV3Credentials`.

Parameters:
  `domainId` - The domain id in case domain-scoped authentication is used, `null` otherwise.
  `projectId` - The project id in case project-scoped authentication is used, `null` otherwise.

### Method Detail

#### getDomainId

    public String getDomainId()

Returns:
  the `domainId`

#### getProjectId

    public String getProjectId()

Returns:
  the `projectId`

#### isDomainScoped

    public boolean isDomainScoped()

Returns `true` if domain-scoped authentication is specified.

Returns:

#### isProjectScoped

    public boolean isProjectScoped()

Returns `true` if project-scoped authentication is specified.

Returns:

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### validate

    public void validate()
                  throws IllegalArgumentException

Validates the configuration. On illegal value combination(s), an `IllegalArgumentException` is thrown.

Throws:
  `IllegalArgumentException`