|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensaml.saml2.metadata.support.AttributeConsumingServiceSelector
public class AttributeConsumingServiceSelector
Metadata support class which selects an AttributeConsumingService based on input of a mandatory
RoleDescriptor and an optional index.
This implementation supports selecting an AttributeConsumingService from parent role descriptors of the following types:
SPSSODescriptorAttributeQueryDescriptorType
Subclasses should override getCandidates() if support for additional sources of attribute consuming services
is needed.
The selection algorithm is:
isOnBadIndexUseDefault() is true, then the default service is returned as described below; otherwise null is
returned.
| Field Summary | |
|---|---|
private Integer |
index
The requested service index. |
private org.slf4j.Logger |
log
Class logger. |
private boolean |
onBadIndexUseDefault
Flag which determines whether, in the case of an invalid index, to return the default AttributeConsumingService. |
private RoleDescriptor |
roleDescriptor
The AttributeConsumingService's parent role descriptor. |
| Constructor Summary | |
|---|---|
AttributeConsumingServiceSelector()
|
|
| Method Summary | |
|---|---|
protected List<AttributeConsumingService> |
getCandidates()
Get the list of candidate attribute consuming services. |
Integer |
getIndex()
Get the index of the desired service. |
RoleDescriptor |
getRoleDescriptor()
Get the AttributeConsumingServie's parent RoleDescriptor. |
boolean |
isOnBadIndexUseDefault()
Get the flag which determines whether, in the case of an invalid index, to return the default AttributeConsumingService. |
private AttributeConsumingService |
selectByIndex(List<AttributeConsumingService> candidates)
Select the service based on the index value. |
private AttributeConsumingService |
selectDefault(List<AttributeConsumingService> candidates)
Select the default service. |
AttributeConsumingService |
selectService()
Select the AttributeConsumingService. |
void |
setIndex(Integer requestedIndex)
Set the index of the desired service. |
void |
setOnBadIndexUseDefault(boolean flag)
Set the flag which determines whether, in the case of an invalid index, to return the default AttributeConsumingService. |
void |
setRoleDescriptor(RoleDescriptor descriptor)
Set the AttributeConsumingServie's parent RoleDescriptor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.slf4j.Logger log
private Integer index
private RoleDescriptor roleDescriptor
private boolean onBadIndexUseDefault
| Constructor Detail |
|---|
public AttributeConsumingServiceSelector()
| Method Detail |
|---|
public Integer getIndex()
public void setIndex(Integer requestedIndex)
requestedIndex - The index to set.public RoleDescriptor getRoleDescriptor()
public void setRoleDescriptor(RoleDescriptor descriptor)
descriptor - The roleDescriptor to set.public void setOnBadIndexUseDefault(boolean flag)
flag - The onBadIndexUseDefault to set.public boolean isOnBadIndexUseDefault()
public AttributeConsumingService selectService()
protected List<AttributeConsumingService> getCandidates()
This implementation supports selecting an AttributeConsumingService from parent role descriptors of the following types:
SPSSODescriptorAttributeQueryDescriptorTypeSubclasses should override if support for additional sources of attribute consuming services is needed.
private AttributeConsumingService selectByIndex(List<AttributeConsumingService> candidates)
candidates - the list of candiate services
private AttributeConsumingService selectDefault(List<AttributeConsumingService> candidates)
candidates - the list of candiate services
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||