Package ch.tocco.nice2.businessunit.api
Class RelationTargetInfo
java.lang.Object
ch.tocco.nice2.businessunit.api.RelationTargetInfo
Holds information about a resolved relation to business-unit dependent
targets.
It contains the possible states:
1. an access error that occurred when resolving the relation
2. the result of resolving the relation against the source entity
3. both of the above, if resolving was at least once successful and
once failed due to an access error
The relation is resolved under the current threads principal but in the
business units of the target entities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional
<RelationTargetInfo> create
(CommandExecutor executor, Entity source, String relationname) Returns theUnauthorizedException
.com.google.common.collect.ImmutableSet
<BusinessUnit> Returns the set of business units used by the target entities.Returns the resulting entity list.boolean
hasError()
Returns `true` if the error list is non emptystatic ch.tocco.nice2.businessunit.api.RelationTargetInfo.ResolveTask
resolveTask
(String relationName)
-
Method Details
-
create
public static Optional<RelationTargetInfo> create(CommandExecutor executor, Entity source, String relationname) -
resolveTask
public static ch.tocco.nice2.businessunit.api.RelationTargetInfo.ResolveTask resolveTask(String relationName) - See Also:
-
getRelationModel
-
getSource
-
getAccessErrors
Returns theUnauthorizedException
. -
hasError
public boolean hasError()Returns `true` if the error list is non empty- Returns:
- whether this holds an error
-
getResult
Returns the resulting entity list. -
getBusinessUnits
Returns the set of business units used by the target entities.
-