Package org.opensaml.saml.common.messaging.context

# Class AbstractSAMLEntityContext

java.lang.Object
org.opensaml.messaging.context.BaseContext
org.opensaml.saml.common.messaging.context.AbstractSAMLEntityContext

All Implemented Interfaces:
  `Iterable<BaseContext>`

Direct Known Subclasses:
  `AbstractAuthenticatableSAMLEntityContext`, `SAMLSelfEntityContext`

public abstract class AbstractSAMLEntityContext extends BaseContext
Abstract base class for subcontexts that carry information about a SAML entity. This context will often contain subcontexts, whose data is construed to be scoped to that entity.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext

`BaseContext.ContextSetNoRemoveIteratorDecorator, BaseContext.DeprecatedContextClassNameLookAside`

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`entityId`
The entityID of the SAML entity.
`private QName`
`role`
The role under which the SAML entity is currently operating.

## Constructor Summary

Constructors
Constructor
Description
`AbstractSAMLEntityContext()`

## Method Summary

Modifier and Type
Method
Description
`String`
`getEntityId()`
Gets the entityId of the SAML entity.
`QName`
`getRole()`
Get the role under which the SAML entity is currently operating.
`void`
`setEntityId(String id)`
Sets the entityId of the SAML entity.
`void`
`setRole(QName newRole)`
Set the role under which the SAML entity is currently operating.

### Methods inherited from class org.opensaml.messaging.context.BaseContext

`addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, ensureSubcontext, ensureSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, removeFromParent, removeSubcontext, removeSubcontext, setParent`

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

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

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

## Field Details

### entityId

@Nullable @NotEmpty private String entityId
The entityID of the SAML entity.

### role

@Nullable private QName role
The role under which the SAML entity is currently operating.

## Constructor Details

### AbstractSAMLEntityContext

public AbstractSAMLEntityContext()

## Method Details

### getEntityId

@Nullable @NotEmpty public String getEntityId()
Gets the entityId of the SAML entity.

Returns:
  entityId of the SAML entity, may be null

### setEntityId

public void setEntityId(@Nullable String id)
Sets the entityId of the SAML entity.

Parameters:
  `id` - the new entityId

### getRole

@Nullable public QName getRole()
Get the role under which the SAML entity is currently operating.

Returns:
  Returns the role.

### setRole

public void setRole(@Nullable QName newRole)
Set the role under which the SAML entity is currently operating.

Parameters:
  `newRole` - The role to set.