|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.panama.mp.privacy.LocationPrivacyManager
LocationPrivacyManager handles location privacy related operations, such as grant location access authorization, revoke the authorization, disable/enable the authorization, set/get privacy directive to the system, check whether a user has right to position another user. All the privacy operations can be done using the methods in this class. The class also provides a variety of ways to retrieve the LocationPrivacyAuth object which keeps the information of a privacy authorization item.
Field Summary | |
static java.lang.String |
DIRECTIVE_ALLOW_LCP This directive whichs allows system to position users who set this directive, and to store the position results in cache |
static java.lang.String |
DIRECTIVE_NO_CACHE This directive allows the system to do positioning, but forbids the system to store the position result into cache |
static java.lang.String |
DIRECTIVE_NO_POSITION This directive forbids the system to position on users who set the directive |
Method Summary | |
static void |
addForbiddenUser(User grantor, User forbiddenUser) This function lets a grantor state an exclusion, representing a user who should NOT be granted authorization for a given domain. |
static void |
addForbiddenUser(User grantor, User forbiddenUser, LocationPrivacyDomain domain) This function lets a grantor state an exclusion, representing a user who should NOT be granted authorization for a given domain. |
static void |
addSystemAuthorization(User grantor, LocationPrivacyGrantee grantee, AuthPeriod period) This function lets a grantor give a general authorization to a grantee (user or community) for a given period. |
static void |
changeSystemAuthorization(LocationPrivacyAuth oldAuth, LocationPrivacyGrantee newGrantee, AuthPeriod newPeriod) Changes the old given old authorization to contain the new period and the new grantee. |
static void |
changeSystemAuthorization(User grantor, LocationPrivacyGrantee oldGrantee, LocationPrivacyGrantee newGrantee, AuthPeriod newPeriod) Changes the old given old authorization to contain the new period and the new grantee. |
static boolean |
checkAuthorization(Service service, User owner, User positionRequester, java.util.Calendar posTime) Deprecated. |
static boolean |
checkAuthorization(User grantor, User grantee, LocationPrivacyDomain domain, java.util.Calendar posTime) This function determines whether a grantee is authorized to see the grantor in a given domain (service or alert service). |
static boolean |
checkGrantorControlledAuthorization(User grantor, User grantee, LocationPrivacyDomain domain, java.util.Calendar posTime) This function determines part of whether a grantee is authorized to see the grantor in a given domain (service or alert service). |
static void |
disableAuthorization(long authId) Deprecated. |
static void |
disableAuthorization(Service service, User owner, Community positionRequester) Deprecated. |
static void |
disableAuthorization(Service service, User owner, User positionRequester) Deprecated. |
static void |
enableAuthorization(long authId) Deprecated. |
static void |
enableAuthorization(Service service, User owner, Community positionRequester) Deprecated. |
static void |
enableAuthorization(Service service, User owner, User positionRequester) Deprecated. |
static java.lang.String |
getDefaultDirective() Deprecated. |
static java.lang.String |
getDirective(User user) Deprecated. |
static LocationPrivacyAuth[] |
getDisabledGrantees(User grantor) Returns the grantees in the grantor's disabled list. |
static LocationPrivacyAuth[] |
getEnabledGrantees(User grantor) Returns the grantees in the grantor's enabled list. |
static LocationPrivacyAuth[] |
getGrantees(User grantor) Returns the grantees in the grantor's list (both enabled and disabled) |
static LocationPrivacyManager |
getInstance() The getter of the LocationPrivacyManager singleton interface |
static ResultSetEnumeration |
getLocationPrivacyAuth(Service service) Deprecated. |
static ResultSetEnumeration |
getLocationPrivacyAuth(Service service, User owner, java.lang.String positionRequesterType, java.lang.String status) Deprecated. |
static java.util.Calendar |
getNextAuthTime(User grantor, User grantee, LocationPrivacyDomain domain, java.util.Calendar posTime) Returns the next time when the grantee has rights to position the grantor. |
static LocationPrivacyAuth |
getSystemAuthorization(User grantor, LocationPrivacyGrantee grantee) This function determines, which general authorization a grantor has given to a grantee (user or community) for a given period. |
static LocationPrivacyAuth[] |
getUserRelatedGrants(User user) Returns the grants for the given user |
static void |
grantAuthorization(Service service, User owner, Community positionRequester, AuthPeriod period) Deprecated. |
static void |
grantAuthorization(Service service, User owner, User positionRequester, AuthPeriod period) Deprecated. |
static boolean |
isCacheEnabledForSystem() This determines whether caching is "system" enabled. |
static boolean |
isCacheEnabledForUser(User user) This determines whether caching is "user" enabled/disabled. |
static boolean |
isLocationDisclosed(User grantor, oracle.panama.alert.AlertService alert, boolean alsoTestSystemDomain) This function determines whether a grantor has given a general authorization to an alert service. |
static boolean |
isLocationDisclosed(User grantor, LocationPrivacyDomain domain, boolean alsoTestSystemDomain) This function determines whether a grantor has given a general authorization to a domain (service or alert service). |
static boolean |
isLocationDisclosed(User grantor, MasterAlertService alert, boolean alsoTestSystemDomain) This function determines whether a grantor has given a general authorization to an alert service. |
static boolean |
isLocationDisclosed(User grantor, Service service) This function determines whether a grantor has given a general authorization to a service. |
static boolean |
isMPEnabledForSystem() This determines whether MP is "system" enabled. |
static boolean |
isMPEnabledForUser(User user) Returns true if mobile positioning is enabled for the given user |
static boolean |
isUserForbidden(User grantor, User anotherUser) This function determines whether a grantor has stated an exclusion, representing a user who should NOT be granted authorization for a given domain. |
static boolean |
isUserForbidden(User grantor, User anotherUser, LocationPrivacyDomain domain) This function determines whether a grantor has stated an exclusion, representing a user who should NOT be granted authorization for a given domain. |
static void |
removeAuthorization(User grantor, LocationPrivacyGrantee grantee, LocationPrivacyDomain domain) Removes an authorization |
static void |
removeForbiddenUser(User grantor, User forbiddenUser) This function lets a grantor remove an exclusion, representing a user who should NOT be granted authorization for a given domain. |
static void |
removeForbiddenUser(User grantor, User forbiddenUser, LocationPrivacyDomain domain) This function lets a grantor remove an exclusion, representing a user who should NOT be granted authorization for a given domain. |
static void |
removeSystemAuthorization(User grantor, LocationPrivacyGrantee grantee) This function lets a grantor remove a general authorization from a grantee (user or community). |
static void |
revokeAuthorization(long authId) Deprecated. |
static void |
revokeAuthorization(Service service, User owner, Community positionRequester) Deprecated. |
static void |
revokeAuthorization(Service service, User owner, User positionRequester) Deprecated. |
static void |
setCacheEnabledForSystem(boolean enabled) Enables/Disables the cache |
static void |
setCacheEnabledForUser(User user, boolean enabled) This sets caching to "user" enabled/disabled. |
static void |
setDirective(User user, java.lang.String directive) Deprecated. |
static void |
setDiscloseLocation(User grantor, oracle.panama.alert.AlertService alert, boolean disclose) This function lets a grantor give a general authorization to an alert service. |
static void |
setDiscloseLocation(User grantor, LocationPrivacyDomain domain, boolean disclose) This function lets a grantor give a general authorization to a domain (service or alert service). |
static void |
setDiscloseLocation(User grantor, MasterAlertService alert, boolean disclose) This function lets a grantor give a general authorization to an alert service. |
static void |
setDiscloseLocation(User grantor, Service service, boolean disclose) This function lets a grantor give a general authorization to a service. |
static void |
setMPEnabledForSystem(boolean enabled) Enables/Disables system level mobile positioning. |
static void |
setMPEnabledForUser(User user, boolean enabled) Enables/Disables mobile positioning for the given user |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DIRECTIVE_ALLOW_LCP
public static final java.lang.String DIRECTIVE_NO_CACHE
public static final java.lang.String DIRECTIVE_NO_POSITION
Method Detail |
public static void addForbiddenUser(User grantor, User forbiddenUser) throws PanamaException
grantor
- a User representing the grantor for the authorizationforbiddenUser
- a User representing the forbidden userPanamaException
public static void addForbiddenUser(User grantor, User forbiddenUser, LocationPrivacyDomain domain) throws PanamaException
grantor
- a User representing the grantor for the authorizationforbiddenUser
- a User representing the forbidden userdomain
- a LocationPrivacyDomain representing the domain for the authorization (service or alert service)PanamaException
public static void addSystemAuthorization(User grantor, LocationPrivacyGrantee grantee, AuthPeriod period) throws PanamaException
grantor
- a User representing the grantor for the authorizationgrantee
- a LocationPrivacyGrantee representing the grantee for the authorization (user or community)period
- a AuthPeriod representing the period during which the grant is validPanamaException
public static void changeSystemAuthorization(LocationPrivacyAuth oldAuth, LocationPrivacyGrantee newGrantee, AuthPeriod newPeriod) throws PanamaException
oldAuth
- the old authorizationnewGrantee
- the new granteenewPeriod
- the new periodPanamaException
public static void changeSystemAuthorization(User grantor, LocationPrivacyGrantee oldGrantee, LocationPrivacyGrantee newGrantee, AuthPeriod newPeriod) throws PanamaException
grantor
- the grantor of the authorization (same for new and old)oldGrantee
- the old granteenewGrantee
- the new granteenewPeriod
- the new periodPanamaException
public static boolean checkAuthorization(Service service, User owner, User positionRequester, java.util.Calendar posTime) throws PanamaException
positionRequester
has right to access the owner
's location information at posTime
in service
.service
- The service in which the checking occurs.owner
- The owner of the location informationpositionRequester
- The user who tries to access the owner's location informationposTime
- The positioning timePanamaException
public static boolean checkAuthorization(User grantor, User grantee, LocationPrivacyDomain domain, java.util.Calendar posTime) throws PanamaException
grantor
- a User representing the grantor for the authorizationgrantee
- a User representing the grantee for the authorizationdomain
- a LocationPrivacyDomain representing the domain for the authorization (service or alert service)posTime
- a Calendar representing the time of requestPanamaException
public static boolean checkGrantorControlledAuthorization(User grantor, User grantee, LocationPrivacyDomain domain, java.util.Calendar posTime) throws PanamaException
grantor
- a User representing the grantor for the authorizationgrantee
- a User representing the grantee for the authorizationdomain
- a LocationPrivacyDomain representing the domain for the authorization (service or alert service)posTime
- a Calendar representing the time of requestPanamaException
public static void disableAuthorization(long authId) throws PanamaException
enable
method, while the revoke can not be recovered without performing a new grant operation. Depending on whether the positionerRequester in this authorization is a single user or a community, the disable operation has slightly differnt effect.authId
- the object Id of the authorization to be disabledPanamaException
disableAuthorization(Service service, User owner, User positionRequester)
, disableAuthorization(Service service, User owner, Community positionRequester)
public static void disableAuthorization(Service service, User owner, Community positionRequester) throws PanamaException
enable
method, while the revoke can not be recovered without performing a new grant operation. Note that the disable operation on a community has different effect from disable operation on a single user. After this disable operation, the disabled granting is treated as nonexist. If no authorization meets the criteria, a PanamaException is thrown.service
- The service in which the disable operation happensowner
- The owner of the location information.positionRequester
- The community whose members' right to access the owner's location information are disabledPanamaException
public static void disableAuthorization(Service service, User owner, User positionRequester) throws PanamaException
enable
method, while the revoke operation can not be recovered without performing a new grant operation. As a single user, the positionRequester will be forbidden to access the owner's location information in the period when the positionRequester is previously granted the right. If no authorization meets the criteria, a PanamaException is thrown.service
- The service in which the disable operation has effectsowner
- The owner of the location information.positionRequester
- The user whose right to access the owner's location information is disabledPanamaException
public static void enableAuthorization(long authId) throws PanamaException
authId
- The object id of the authorization to be recovered.PanamaException
public static void enableAuthorization(Service service, User owner, Community positionRequester) throws PanamaException
service
- The service in which the disable operation happensowner
- The owner of the location information.positionRequester
- The community whose members' rights to access the owner's location information are to be recovered.PanamaException
disableAuthorization(Service service, User owner, Community positionRequester)
public static void enableAuthorization(Service service, User owner, User positionRequester) throws PanamaException
service
- The service in which the disable operation has effectsowner
- The owner of the location information.positionRequester
- The user whose right to access the owner's location information is to be recovered.PanamaException
disableAuthorization(Service service, User owner, User positionRequester)
public static java.lang.String getDefaultDirective()
DIRECTIVE_NO_POSITION
, DIRECTIVE_NO_CACHE
, DIRECTIVE_ALLOW_LCP
public static java.lang.String getDirective(User user)
user
- the user whose directive is to be obtainedDIRECTIVE_NO_POSITION
, DIRECTIVE_NO_CACHE
, DIRECTIVE_ALLOW_LCP
public static LocationPrivacyAuth[] getDisabledGrantees(User grantor)
grantor
- the grantorpublic static LocationPrivacyAuth[] getEnabledGrantees(User grantor)
grantor
- the grantorpublic static LocationPrivacyAuth[] getGrantees(User grantor)
grantor
- the grantorpublic static LocationPrivacyManager getInstance()
public static ResultSetEnumeration getLocationPrivacyAuth(Service service) throws PanamaException
service
service
- The service to which the grantings belongPanamaException
- if LocationPrivacyAuth can not be foundpublic static ResultSetEnumeration getLocationPrivacyAuth(Service service, User owner, java.lang.String positionRequesterType, java.lang.String status) throws PanamaException
service
, the privacy owner
, the type
of the positionRequester and the status
of the authorizationservice
- the service to which the requested loation privacy authorization items belongowner
- the user who grants the authorizationpositionRequesterType
- the type of the positionRequester. If it is set, the value is either User.typeName or Community.TypeName. If this parameter is null, return both typesstatus
- the status of the authorization. If the status parameter is null, return all the authorizations that meet the other criteria no matter what status the authorization has.PanamaException
- if LocationPrivacyAuth can not be foundLocationPrivacyAuth
public static java.util.Calendar getNextAuthTime(User grantor, User grantee, LocationPrivacyDomain domain, java.util.Calendar posTime) throws PanamaException
grantor
- the grantorgrantee
- the granteedomain
- the domain of the authorizationposTime
- the earliest time desired in the resultPanamaException
public static LocationPrivacyAuth getSystemAuthorization(User grantor, LocationPrivacyGrantee grantee) throws PanamaException
grantor
- a User representing the grantor for the authorizationgrantee
- a LocationPrivacyGrantee representing the grantee for the authorization (user or community)PanamaException
public static LocationPrivacyAuth[] getUserRelatedGrants(User user)
user
- the userpublic static void grantAuthorization(Service service, User owner, Community positionRequester, AuthPeriod period) throws PanamaException
owner
to grant positionRequester
in the application(service
) the right to access the owner
's location information within the period specified by period
If the same owner
has granted the same positionRequester
the right in the same service
, this new grant will replace the old granting.service
- The service in which the granting has effectsowner
- The user who would like to grant the location access right to otherspositionRequester
- The community whose members will get the rightperiod
- The positionRequester can only access to the owner's location information within the specified periodPanamaException
public static void grantAuthorization(Service service, User owner, User positionRequester, AuthPeriod period) throws PanamaException
owner
to grant positionRequester
in the application(service
) the right to access the owner
's location information within the period specified by period
If the same owner
has granted the same positionRequester
the right in the same service
, this new grant will replace the old granting.service
- The service in which the granting happensowner
- The user who would like to grant the location access right to positionRequesterpositionRequester
- The user who will get the rightperiod
- The positionRequester can only access to the owner's location information within the specified periodPanamaException
public static boolean isCacheEnabledForSystem() throws PanamaException
PanamaException
public static boolean isCacheEnabledForUser(User user) throws PanamaException
user
- a User representing the user for whome to set caching to enabled/disabledPanamaException
public static boolean isLocationDisclosed(User grantor, oracle.panama.alert.AlertService alert, boolean alsoTestSystemDomain) throws PanamaException
grantor
- a User representing the grantor for the authorizationalert
- an AlertService representing the alert service for the authorization (service or alert service)PanamaException
public static boolean isLocationDisclosed(User grantor, LocationPrivacyDomain domain, boolean alsoTestSystemDomain) throws PanamaException
grantor
- a User representing the grantor for the authorizationdomain
- a LocationPrivacyDomain representing the domain for the authorization (service or alert service)PanamaException
public static boolean isLocationDisclosed(User grantor, MasterAlertService alert, boolean alsoTestSystemDomain) throws PanamaException
grantor
- a User representing the grantor for the authorizationalert
- a MasterAlertService representing the alert service for the authorization (service or alert service)PanamaException
public static boolean isLocationDisclosed(User grantor, Service service) throws PanamaException
grantor
- a User representing the grantor for the authorizationservice
- a Service representing the service for the authorization (service or alert service)PanamaException
public static boolean isMPEnabledForSystem() throws PanamaException
PanamaException
public static boolean isMPEnabledForUser(User user) throws PanamaException
user
- the userPanamaException
public static boolean isUserForbidden(User grantor, User anotherUser) throws PanamaException
grantor
- a User representing the grantor for the authorizationPanamaException
public static boolean isUserForbidden(User grantor, User anotherUser, LocationPrivacyDomain domain) throws PanamaException
grantor
- a User representing the grantor for the authorizationdomain
- a LocationPrivacyDomain representing the domain for the authorization (service or alert service)PanamaException
public static void removeAuthorization(User grantor, LocationPrivacyGrantee grantee, LocationPrivacyDomain domain) throws PanamaException
grantor
- the grantorgrantee
- the grantordomain
- the domainPanamaException
public static void removeForbiddenUser(User grantor, User forbiddenUser) throws PanamaException
grantor
- a User representing the grantor for the authorizationforbiddenUser
- a User representing the forbidden userPanamaException
public static void removeForbiddenUser(User grantor, User forbiddenUser, LocationPrivacyDomain domain) throws PanamaException
grantor
- a User representing the grantor for the authorizationforbiddenUser
- a User representing the forbidden userdomain
- a LocationPrivacyDomain representing the domain for the authorization (service or alert service)PanamaException
public static void removeSystemAuthorization(User grantor, LocationPrivacyGrantee grantee) throws PanamaException
grantor
- a User representing the grantor for the authorizationgrantee
- a LocationPrivacyGrantee representing the grantee for the authorization (user or community)PanamaException
public static void revokeAuthorization(long authId) throws PanamaException
authId
- The object Id of the authorizationPanamaException
public static void revokeAuthorization(Service service, User owner, Community positionRequester) throws PanamaException
service
- The service in which the revoking has effectsowner
- The owner of the location information.positionRequester
- The community whose members' right to access the owner's location information is be revokedPanamaException
public static void revokeAuthorization(Service service, User owner, User positionRequester) throws PanamaException
service
- The service in which the revoking has effectsowner
- The owner of the location information.positionRequester
- The user whose right to access the owner's location information is be revokedPanamaException
public static void setCacheEnabledForSystem(boolean enabled) throws PanamaException
enabled
- the flag which indicates wether to enable or disablePanamaException
public static void setCacheEnabledForUser(User user, boolean enabled) throws PanamaException
user
- a User representing the user for whome to set caching to enabled/disabledenabled
- a boolean specifying whether caching should be enabled (true) or disabled (false)PanamaException
public static void setDirective(User user, java.lang.String directive) throws PanamaException
directive
- one of the three system level directives DIRECTIV_NO_POSITION, DIRECTIVE_NO_CACHE, or DIRECTIVE_ALLOW_LCPPanamaException
DIRECTIVE_NO_POSITION
, DIRECTIVE_NO_CACHE
, DIRECTIVE_ALLOW_LCP
public static void setDiscloseLocation(User grantor, oracle.panama.alert.AlertService alert, boolean disclose) throws PanamaException
grantor
- a User representing the grantor for the authorizationalert
- an AlertService representing the alert service for the authorizationdisclose
- a boolean representing whether or not the grantor gives the authorizationPanamaException
public static void setDiscloseLocation(User grantor, LocationPrivacyDomain domain, boolean disclose) throws PanamaException
grantor
- a User representing the grantor for the authorizationdomain
- a LocationPrivacyDomain representing the domain for the authorization (service or alert service)disclose
- a boolean representing whether or not the grantor gives the authorizationPanamaException
public static void setDiscloseLocation(User grantor, MasterAlertService alert, boolean disclose) throws PanamaException
grantor
- a User representing the grantor for the authorizationalert
- a MasterAlertService representing the alert service for the authorizationdisclose
- a boolean representing whether or not the grantor gives the authorizationPanamaException
public static void setDiscloseLocation(User grantor, Service service, boolean disclose) throws PanamaException
grantor
- a User representing the grantor for the authorizationservice
- a Service representing the service for the authorizationdisclose
- a boolean representing whether or not the grantor gives the authorizationPanamaException
public static void setMPEnabledForSystem(boolean enabled) throws PanamaException
enabled
- the flag which indicates wether to enable or disablePanamaException
public static void setMPEnabledForUser(User user, boolean enabled) throws PanamaException
user
- the userenabled
- the flag indicating wether to enable or disablePanamaException
|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |