Package com.sun.identity.entitlement
Class EntitlementListener
- java.lang.Object
-
- com.sun.identity.entitlement.EntitlementListener
-
public final class EntitlementListener extends Object
Listener for receiving entitlements related changes.
-
-
Constructor Summary
Constructors Constructor Description EntitlementListener(String url, String application, Collection<String> resourceNames)Constructor.EntitlementListener(URL url, String application, Collection<String> resourceNames)Constructor.EntitlementListener(org.json.JSONObject jo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancombine(EntitlementListener l)Combines other listener.booleanequals(Object other)Map<String,Set<String>>getMapAppToRes()Returns map of application name to resource names.URLgetUrl()Returns notification URL.inthashCode()org.json.JSONObjecttoJSON()
-
-
-
Constructor Detail
-
EntitlementListener
public EntitlementListener(org.json.JSONObject jo) throws org.json.JSONException, EntitlementException- Throws:
org.json.JSONExceptionEntitlementException
-
EntitlementListener
public EntitlementListener(String url, String application, Collection<String> resourceNames) throws EntitlementException
Constructor.- Parameters:
url- URL of which notification will be sent to.application- Application name.resourceNames- Notification will be send tourlif privilege for resources matches with the elements inresourceNames. Wildcard and sub resource matching apply too.- Throws:
EntitlementException- ifurlorresourceNamesis null.
-
EntitlementListener
public EntitlementListener(URL url, String application, Collection<String> resourceNames) throws EntitlementException
Constructor.- Parameters:
url- URL of which notification will be sent to.application- Application name.resourceNames- Notification will be send tourlif privilege for resources matches with the elements inresourceNames. Wildcard and sub resource matching apply too.- Throws:
EntitlementException- ifurlorresourceNamesis null.
-
-
Method Detail
-
toJSON
public org.json.JSONObject toJSON() throws org.json.JSONException- Throws:
org.json.JSONException
-
getMapAppToRes
public Map<String,Set<String>> getMapAppToRes()
Returns map of application name to resource names.- Returns:
- map of application name to resource names.
-
getUrl
public URL getUrl()
Returns notification URL.- Returns:
- notification URL.
-
combine
public boolean combine(EntitlementListener l)
Combines other listener. Returnstrueif combination is possible.- Parameters:
l- listener.- Returns:
trueif combination is done.
-
-