Class SessionQueryFilterRealm
- java.lang.Object
-
- org.forgerock.openam.session.service.access.SessionQueryFilterRealm
-
public final class SessionQueryFilterRealm extends Object
Reads the realm a session CREST query filter asks for, so that the realm can be authorized against the caller before the query is run against the CTS.The supported filter shapes are the ones supported by
org.forgerock.openam.session.service.access.persistence.SessionQueryFilterVisitor, i.e. and of equals comparisons. Any other filter type is rejected with anUnsupportedOperationExceptionby the visitor this class is based on, exactly as it would be rejected when the filter is later translated into a CTS query.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringextract(CrestQuery crestQuery)Returns the realm named in the query filter of the provided CREST query.
-
-
-
Method Detail
-
extract
public static String extract(CrestQuery crestQuery)
Returns the realm named in the query filter of the provided CREST query.- Parameters:
crestQuery- The CREST query to inspect. May benull.- Returns:
- The realm named in the query filter, or
nullif the query does not carry a filter, or the filter does not name a realm. - Throws:
IllegalArgumentException- If the filter names more than one realm, since in that case the realm the query would run against cannot be authorized, or if the realm contains a .. path segment, since such a realm is authorized as the path it is written as, while it may name another realm once it is resolved.
-
-