Package net.shibboleth.idp.consent

# Class Consent

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.consent.Consent

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`

public class Consent extends AbstractIdentifiableInitializableComponent
Represents consent. A consent object consists of an identifier, a value (usually a hash) representing the thing being consented to, and a boolean which indicates whether consent is approved or denied.

## Field Summary

Fields
Modifier and Type
Field
Description
`private boolean`
`approved`
Whether consent is approved.
`private String`
`value`
Consent value.
`static final String`
`WILDCARD`
Wildcard used to represent consent to any ID or value.

## Constructor Summary

Constructors
Constructor
Description
`Consent()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`String`
`getValue()`
Get the consent value.
`int`
`hashCode()`
`boolean`
`isApproved()`
Whether consent is approved or denied.
`void`
`setApproved(boolean flag)`
Set whether consent is approved.
`void`
`setValue(String val)`
Set the consent value.
`String`
`toString()`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

`setId`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

`doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitialized`

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

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

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

## Field Details

### WILDCARD

@Nonnull @NotEmpty public static final String WILDCARD
Wildcard used to represent consent to any ID or value.

See Also:
  - Constant Field Values

### value

@Nullable private String value
Consent value.

### approved

private boolean approved
Whether consent is approved.

## Constructor Details

### Consent

public Consent()

## Method Details

### getValue

@Nullable public String getValue()
Get the consent value.

Returns:
  the consent value

### isApproved

public boolean isApproved()
Whether consent is approved or denied.

Returns:
  true if consent is approved

### setValue

public void setValue(@Nonnull @NotEmpty String val)
Set the consent value.

Parameters:
  `val` - the consent value

### setApproved

public void setApproved(boolean flag)
Set whether consent is approved.

Parameters:
  `flag` - true if consent is approved

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`