Class RhinoDomain
- Author:
- przemek hertel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the root element of domain for given profile.get(String profile, HigsonContext ctx) Returns the root element of domain for given profile, associated with the given context object.Returns the element of domain identified by the provided path for given profile.get(String profile, String path, HigsonContext ctx) Returns the element of domain identified by the provided path for given profile, evaluated with the provided context.Returns codes of profiles with at least one domain element.
-
Constructor Details
-
RhinoDomain
-
-
Method Details
-
get
Returns the element of domain identified by the provided path for given profile, evaluated with the provided context.- Parameters:
profile- code of the profile,path- domain path starting from the root element. The path separator ('/') at the beginning ofpathis optional.nullor empty path ("") corresponds to the root element.ctx-HigsonContextobject.- Returns:
- if
pathpoints to single domain element (not collection), the result is the element of domain identified by thepathfor the given profile.If
path == null, the result is the root domain element.If
pathpoints to non-empty collection, the result is any element of the collection. WARNING: It is not guaranteed which element of the collection will be returned. In future releases the value returned in this case will be different. Therefore, at the moment it is strongly discouraged to use this method withpathpointing to a collection.In all cases the returned element will be evaluated with the provided context object
ctx, unless it isnull. Ifctx == null, the returned element will not have a context object to evaluate with. - Throws:
HigsonRuntimeException- ifprofile != nulland any of the following is true:- profile with the given code does not exist in the system, or
- there are no domain elements in the profile with the given code, or
pathis not a valid domain path starting from the root element for the given profile, orpathpoints to an empty collection. WARNING: this behaviour is likely to change in future releases.
-
get
Returns the element of domain identified by the provided path for given profile.- Parameters:
profile- code of the profile,path- domain path starting from the root element. The path separator ('/') at the beginning ofpathis optional.nullor empty path ("") corresponds to the root element.- Returns:
- if
pathpoints to single domain element (not collection), the result is the element of domain identified by thepathfor the given profile.If
path == null, the result is the root domain element.If
pathpoints to non-empty collection, the result is any element of the collection. WARNING: It is not guaranteed which element of the collection will be returned. In future releases the value returned in this case will be different. Therefore, at the moment it is strongly discouraged to use this method withpathpointing to a collection.In all cases the returned element will not have a context object to be evaluated with.
- Throws:
HigsonRuntimeException- ifprofile != nulland any of the following is true:- profile with the given code does not exist in the system, or
- there are no domain elements in the profile with the given code, or
pathis not a valid domain path starting from the root element for the given profile, orpathpoints to an empty collection. WARNING: this behaviour is likely to change in future releases.
-
get
Returns the root element of domain for given profile, associated with the given context object.- Parameters:
profile- code of the profile,ctx- context object.- Returns:
- root element of domain associated with the profile. Returned domain element will be evaluated with
the provided
HigsonContextobject, unlessctx == null. If that case the returned domain element will not have a context object to be evaluated with. - Throws:
HigsonRuntimeException- ifprofile != nulland any of the following is true::- profile with the given code does not exist in the system or
- there are no domain elements in the profile with the given code.
-
get
Returns the root element of domain for given profile.- Parameters:
profile- code of the profile.- Returns:
- root element of domain associated with the profile. The returned element will not have a context object to be evaluated with.
- Throws:
HigsonRuntimeException- if:profile != nulland profile with the given code does not exist in the system orprofile != nulland there are no domain elements in the profile with the given code.
RuntimeException- ifprofile == null.
-
getProfiles
Returns codes of profiles with at least one domain element.- Returns:
Listof profile codes for all profiles with at least one domain element, or empty list if there are no such profiles.
-