Oracle Application Server Wireless Java API Reference
B10400-01

oracle.panama.mp.privacy
Class LocationPrivacyManager

java.lang.Object
  |
  +--oracle.panama.mp.privacy.LocationPrivacyManager

public class LocationPrivacyManager
extends java.lang.Object

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.

Author:
Jiwu

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)
           
static void changeSystemAuthorization(User grantor, LocationPrivacyGrantee oldGrantee, LocationPrivacyGrantee newGrantee, AuthPeriod newPeriod)
           
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)
           
static LocationPrivacyAuth[] getEnabledGrantees(User grantor)
           
static LocationPrivacyAuth[] getGrantees(User grantor)
           
static LocationPrivacyManager getInstance()
          The getter.
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)
           
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)
           
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)
           
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)
           
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)
           
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)
           
static void setMPEnabledForUser(User user, boolean enabled)
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

DIRECTIVE_NO_POSITION

public static final java.lang.String DIRECTIVE_NO_POSITION
This directive forbids the system to position on users who set the directive
See Also:
Constant Field Values

DIRECTIVE_NO_CACHE

public static final 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
See Also:
Constant Field Values

DIRECTIVE_ALLOW_LCP

public static final 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
See Also:
Constant Field Values
Method Detail

getInstance

public static LocationPrivacyManager getInstance()
The getter.
Returns:
the LocationPrivacyManager singleton interface.

setDirective

public static void setDirective(User user,
                                java.lang.String directive)
                         throws PanamaException
Deprecated.  
set the user's location privacy directive. A user's location privacy directive is a system level directive, which applies in all the applications.
Parameters:
directive - one of the three system level directives DIRECTIV_NO_POSITION, DIRECTIVE_NO_CACHE, or DIRECTIVE_ALLOW_LCP
PanamaException
See Also:
DIRECTIVE_NO_POSITION, DIRECTIVE_NO_CACHE, DIRECTIVE_ALLOW_LCP

getDirective

public static java.lang.String getDirective(User user)
Deprecated.  
Get the user's system level location privacy directive. If the user has not set the directive, the system default directive is returned.
Parameters:
user - the user whose directive is to be obtained
Returns:
directive one of the three system level directives DIRECTIV_NO_POSITION, DIRECTIVE_NO_CACHE, or DIRECTIVE_ALLOW_LCP
See Also:
DIRECTIVE_NO_POSITION, DIRECTIVE_NO_CACHE, DIRECTIVE_ALLOW_LCP

grantAuthorization

public static void grantAuthorization(Service service,
User owner,
User positionRequester,
AuthPeriod period)
                               throws PanamaException
Deprecated.  
This method is used for 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.
Parameters:
service - The service in which the granting happens
owner - The user who would like to grant the location access right to positionRequester
positionRequester - The user who will get the right
period - The positionRequester can only access to the owner's location information within the specified period
PanamaException

grantAuthorization

public static void grantAuthorization(Service service,
User owner,
Community positionRequester,
AuthPeriod period)
                               throws PanamaException
Deprecated.  
This method is used for 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.
Parameters:
service - The service in which the granting has effects
owner - The user who would like to grant the location access right to others
positionRequester - The community whose members will get the right
period - The positionRequester can only access to the owner's location information within the specified period
PanamaException

revokeAuthorization

public static void revokeAuthorization(Service service,
User owner,
User positionRequester)
                                throws PanamaException
Deprecated.  
This method is used for revoking granted authorization. If no authorization meets the criteria, the method does nothing and simply returns
Parameters:
service - The service in which the revoking has effects
owner - The owner of the location information.
positionRequester - The user whose right to access the owner's location information is be revoked
Throws:
PanamaException

revokeAuthorization

public static void revokeAuthorization(long authId)
                                throws PanamaException
Deprecated.  
This method is used for revoking granted authorization by the object Id of the authorization. If no such authorization exists, the method does nothing and simply returns
Parameters:
authId - The object Id of the authorization
Throws:
PanamaException

revokeAuthorization

public static void revokeAuthorization(Service service,
User owner,
Community positionRequester)
                                throws PanamaException
Deprecated.  
This method is used for revoking granted authorization. If no authorization meets the criteria, the method does nothing and simply returns
Parameters:
service - The service in which the revoking has effects
owner - The owner of the location information.
positionRequester - The community whose members' right to access the owner's location information is be revoked
Throws:
PanamaException

disableAuthorization

public static void disableAuthorization(Service service,
User owner,
User positionRequester)
                                 throws PanamaException
Deprecated.  
This method is used for temporarily disabling the granted authorization It is different from revoking in that the disabled granting can be recovered later on by calling 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.
Parameters:
service - The service in which the disable operation has effects
owner - The owner of the location information.
positionRequester - The user whose right to access the owner's location information is disabled
PanamaException

enableAuthorization

public static void enableAuthorization(Service service,
User owner,
User positionRequester)
                                throws PanamaException
Deprecated.  
This method is used for recovering a temporarily disabled authorization. If no authorization meets the criteria, a PanamaException is thrown.
Parameters:
service - The service in which the disable operation has effects
owner - The owner of the location information.
positionRequester - The user whose right to access the owner's location information is to be recovered.
PanamaException
See Also:
disableAuthorization(Service service, User owner, User positionRequester)

enableAuthorization

public static void enableAuthorization(long authId)
                                throws PanamaException
Deprecated.  
This method is used for recovering a temporarily disabled authorization. If no authorization meets the criteria, a PanamaException is thrown.
Parameters:
authId - The object id of the authorization to be recovered.
PanamaException

disableAuthorization

public static void disableAuthorization(Service service,
User owner,
Community positionRequester)
                                 throws PanamaException
Deprecated.  
This method is used for temporarily disabling the granted authorization It is different from revoking in that the disabled granting can be recovered later on by calling 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.
Parameters:
service - The service in which the disable operation happens
owner - The owner of the location information.
positionRequester - The community whose members' right to access the owner's location information are disabled
PanamaException

enableAuthorization

public static void enableAuthorization(Service service,
User owner,
Community positionRequester)
                                throws PanamaException
Deprecated.  
This method is used for recovering a temporarily disabled authorization.
Parameters:
service - The service in which the disable operation happens
owner - The owner of the location information.
positionRequester - The community whose members' rights to access the owner's location information are to be recovered.
PanamaException
See Also:
disableAuthorization(Service service, User owner, Community positionRequester)

disableAuthorization

public static void disableAuthorization(long authId)
                                 throws PanamaException
Deprecated.  
This method is used for temporarily disabling the granted authorization It is different from revoking in that the disabled granting can be recovered later on by calling 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.
Parameters:
authId - the object Id of the authorization to be disabled
PanamaException
See Also:
disableAuthorization(Service service, User owner, User positionRequester), disableAuthorization(Service service, User owner, Community positionRequester)

checkAuthorization

public static boolean checkAuthorization(Service service,
User owner,
User positionRequester,
                                         java.util.Calendar posTime)
                                  throws PanamaException
Deprecated.  
Check whether the positionRequester has right to access the owner's location information at posTime in service.
Parameters:
service - The service in which the checking occurs.
owner - The owner of the location information
positionRequester - The user who tries to access the owner's location information
posTime - The positioning time
Returns:
if the positionRequester has right, true is returned. Otherwise, false is returned
PanamaException

getLocationPrivacyAuth

public static ResultSetEnumeration getLocationPrivacyAuth(Service service,
User owner,
                                                          java.lang.String positionRequesterType,
                                                          java.lang.String status)
                                                   throws PanamaException
Deprecated.  
Find LocationPrivacyAuth by service, the privacy owner, the type of the positionRequester and the status of the authorization
Parameters:
service - the service to which the requested loation privacy authorization items belong
owner - the user who grants the authorization
positionRequesterType - 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 types
status - 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.
Returns:
a ResultSetEnumeration object of LocationPrivacyAuth objects
Throws:
PanamaException - if LocationPrivacyAuth can not be found
See Also:
LocationPrivacyAuth

getLocationPrivacyAuth

public static ResultSetEnumeration getLocationPrivacyAuth(Service service)
                                                   throws PanamaException
Deprecated.  
Get all the granting items in the service
Parameters:
service - The service to which the grantings belong
Returns:
A ResultSetEnumeration which contains the retrieved granting items.
Throws:
PanamaException - if LocationPrivacyAuth can not be found

getDefaultDirective

public static java.lang.String getDefaultDirective()
Deprecated.  
Get the default directive if a user has not set his own directive to the system
Returns:
depending on the system setting, returns one of the three values of DIRECTIVE_NO_POSITION,DIRECTIVE_NO_CACHE,DIRECTIVE_ALLOW_LCP
See Also:
DIRECTIVE_NO_POSITION, DIRECTIVE_NO_CACHE, DIRECTIVE_ALLOW_LCP

setMPEnabledForUser

public static void setMPEnabledForUser(User user,
                                       boolean enabled)
                                throws PanamaException
PanamaException

setCacheEnabledForUser

public static void setCacheEnabledForUser(User user,
                                          boolean enabled)
                                   throws PanamaException
This sets caching to "user" enabled/disabled. We can then have the following combinations: (a) Caching system enabled, and enabled for user A (b) Caching system enabled, but disabled for user A (c) Caching system disabled, but enabled for user A (d) Caching system disabled, and disabled for user A Ultimately, caching for a user A can only be used if it is enabled both for the system in general and for user A, specifically.
Parameters:
user - a User representing the user for whome to set caching to enabled/disabled
enabled - a boolean specifying whether caching should be enabled (true) or disabled (false)
PanamaException

isMPEnabledForSystem

public static boolean isMPEnabledForSystem()
                                    throws PanamaException
This determines whether MP is "system" enabled. There are three possible states: (1) MP "system" disabled (2) MP "system" enabled (3) Caching "system" enabled Both for states (2) and (3), this function will return true.
PanamaException

isMPEnabledForUser

public static boolean isMPEnabledForUser(User user)
                                  throws PanamaException
PanamaException

isCacheEnabledForSystem

public static boolean isCacheEnabledForSystem()
                                       throws PanamaException
This determines whether caching is "system" enabled. There are three possible states: (1) MP "system" disabled (2) MP "system" enabled (3) Caching "system" enabled For state (1), this function will return true.
PanamaException

isCacheEnabledForUser

public static boolean isCacheEnabledForUser(User user)
                                     throws PanamaException
This determines whether caching is "user" enabled/disabled. We can have the following combinations: (a) Caching system enabled, and enabled for user A (b) Caching system enabled, but disabled for user A (c) Caching system disabled, but enabled for user A (d) Caching system disabled, and disabled for user A Both in cases (a) and (c), this function will return true. The function does not make any statement about whether MP or system caching are enabled.
Parameters:
user - a User representing the user for whome to set caching to enabled/disabled
PanamaException

addSystemAuthorization

public static void addSystemAuthorization(User grantor,
LocationPrivacyGrantee grantee,
AuthPeriod period)
                                   throws PanamaException
This function lets a grantor give a general authorization to a grantee (user or community) for a given period. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function affects condition (4).
Parameters:
grantor - a User representing the grantor for the authorization
grantee - a LocationPrivacyGrantee representing the grantee for the authorization (user or community)
period - a AuthPeriod representing the period during which the grant is valid
PanamaException

getSystemAuthorization

public static LocationPrivacyAuth getSystemAuthorization(User grantor,
LocationPrivacyGrantee grantee)
                                                  throws PanamaException
This function determines, which general authorization a grantor has given to a grantee (user or community) for a given period. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function determines condition (4).
Parameters:
grantor - a User representing the grantor for the authorization
grantee - a LocationPrivacyGrantee representing the grantee for the authorization (user or community)
Returns:
a LocationPrivacyAuth representing the authorization object
PanamaException

removeSystemAuthorization

public static void removeSystemAuthorization(User grantor,
LocationPrivacyGrantee grantee)
                                      throws PanamaException
This function lets a grantor remove a general authorization from a grantee (user or community). For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function affects condition (4).
Parameters:
grantor - a User representing the grantor for the authorization
grantee - a LocationPrivacyGrantee representing the grantee for the authorization (user or community)
PanamaException

setDiscloseLocation

public static void setDiscloseLocation(User grantor,
LocationPrivacyDomain domain,
                                       boolean disclose)
                                throws PanamaException
This function lets a grantor give a general authorization to a domain (service or alert service). Denying authorization to a domain (service or alert service) does not just mean that no other user can position user x with that domain. It also results in not even user x being able to position herself. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function affects condition (2).
Parameters:
grantor - a User representing the grantor for the authorization
domain - a LocationPrivacyDomain representing the domain for the authorization (service or alert service)
disclose - a boolean representing whether or not the grantor gives the authorization
PanamaException

setDiscloseLocation

public static void setDiscloseLocation(User grantor,
Service service,
                                       boolean disclose)
                                throws PanamaException
This function lets a grantor give a general authorization to a service. Denying authorization to a domain (service or alert service) does not just mean that no other user can position user x with that domain. It also results in not even user x being able to position herself. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the service (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function affects condition (2).
Parameters:
grantor - a User representing the grantor for the authorization
service - a Service representing the service for the authorization
disclose - a boolean representing whether or not the grantor gives the authorization
PanamaException

setDiscloseLocation

public static void setDiscloseLocation(User grantor,
                                       oracle.panama.alert.AlertService alert,
                                       boolean disclose)
                                throws PanamaException
This function lets a grantor give a general authorization to an alert service. Denying authorization to a domain (service or alert service) does not just mean that no other user can position user x with that domain. It also results in not even user x being able to position herself. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the alert service (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function affects condition (2).
Parameters:
grantor - a User representing the grantor for the authorization
alert - an AlertService representing the alert service for the authorization
disclose - a boolean representing whether or not the grantor gives the authorization
PanamaException

setDiscloseLocation

public static void setDiscloseLocation(User grantor,
MasterAlertService alert,
                                       boolean disclose)
                                throws PanamaException
This function lets a grantor give a general authorization to an alert service. Denying authorization to a domain (service or alert service) does not just mean that no other user can position user x with that domain. It also results in not even user x being able to position herself. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the alert service (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function affects condition (2).
Parameters:
grantor - a User representing the grantor for the authorization
alert - a MasterAlertService representing the alert service for the authorization
disclose - a boolean representing whether or not the grantor gives the authorization
PanamaException

isLocationDisclosed

public static boolean isLocationDisclosed(User grantor,
LocationPrivacyDomain domain,
                                          boolean alsoTestSystemDomain)
                                   throws PanamaException
This function determines whether a grantor has given a general authorization to a domain (service or alert service). Denying authorization to a domain (service or alert service) does not just mean that no other user can position user x with that domain. It also results in not even user x being able to position herself. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function determines condition (2). It does not determine any of the other requirements.
Parameters:
grantor - a User representing the grantor for the authorization
domain - a LocationPrivacyDomain representing the domain for the authorization (service or alert service)
Returns:
a boolean representing whether or not the grantor has given the authorization
PanamaException

isLocationDisclosed

public static boolean isLocationDisclosed(User grantor,
Service service)
                                   throws PanamaException
This function determines whether a grantor has given a general authorization to a service. Denying authorization to a domain (service or alert service) does not just mean that no other user can position user x with that domain. It also results in not even user x being able to position herself. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the service (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function determines condition (2). It does not determine any of the other requirements.
Parameters:
grantor - a User representing the grantor for the authorization
service - a Service representing the service for the authorization (service or alert service)
Returns:
a boolean representing whether or not the grantor has given the authorization
PanamaException

isLocationDisclosed

public static boolean isLocationDisclosed(User grantor,
                                          oracle.panama.alert.AlertService alert,
                                          boolean alsoTestSystemDomain)
                                   throws PanamaException
This function determines whether a grantor has given a general authorization to an alert service. Denying authorization to a domain (service or alert service) does not just mean that no other user can position user x with that domain. It also results in not even user x being able to position herself. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the alert service (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function determines condition (2). It does not determine any of the other requirements.
Parameters:
grantor - a User representing the grantor for the authorization
alert - an AlertService representing the alert service for the authorization (service or alert service)
Returns:
a boolean representing whether or not the grantor has given the authorization
PanamaException

isLocationDisclosed

public static boolean isLocationDisclosed(User grantor,
MasterAlertService alert,
                                          boolean alsoTestSystemDomain)
                                   throws PanamaException
This function determines whether a grantor has given a general authorization to an alert service. Denying authorization to a domain (service or alert service) does not just mean that no other user can position user x with that domain. It also results in not even user x being able to position herself. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the alert service (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function determines condition (2). It does not determine any of the other requirements.
Parameters:
grantor - a User representing the grantor for the authorization
alert - a MasterAlertService representing the alert service for the authorization (service or alert service)
Returns:
a boolean representing whether or not the grantor has given the authorization
PanamaException

addForbiddenUser

public static void addForbiddenUser(User grantor,
User forbiddenUser)
                             throws PanamaException
This function lets a grantor state an exclusion, representing a user who should NOT be granted authorization for a given domain. If no domain is specified, such an exclusion is exactly the opposite of a system authorization with respect to the given grantee (addSystemAuthorization). Thus, if a user is first forbidden for all domains, and then gets authorized for all domains (addSystemAuthorization), then this automatically includes an implicit revocation of the "forbidden user" setting (removeForbiddenUser). An exclusion can be used when a user grants authorization to a community, but would like to exclude a single user. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function affects condition (3).
Parameters:
grantor - a User representing the grantor for the authorization
forbiddenUser - a User representing the forbidden user
PanamaException

addForbiddenUser

public static void addForbiddenUser(User grantor,
User forbiddenUser,
LocationPrivacyDomain domain)
                             throws PanamaException
This function lets a grantor state an exclusion, representing a user who should NOT be granted authorization for a given domain. If no domain is specified, such an exclusion is exactly the opposite of a system authorization with respect to the given grantee (addSystemAuthorization). Thus, if a user is first forbidden for all domains, and then gets authorized for all domains (addSystemAuthorization), then this automatically includes an implicit revocation of the "forbidden user" setting (removeForbiddenUser). An exclusion can be used when a user grants authorization to a community, but would like to exclude a single user. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function affects condition (3).
Parameters:
grantor - a User representing the grantor for the authorization
forbiddenUser - a User representing the forbidden user
domain - a LocationPrivacyDomain representing the domain for the authorization (service or alert service)
PanamaException

removeForbiddenUser

public static void removeForbiddenUser(User grantor,
User forbiddenUser)
                                throws PanamaException
This function lets a grantor remove an exclusion, representing a user who should NOT be granted authorization for a given domain. If no domain is specified, such an exclusion is exactly the opposite of a system authorization with respect to the given grantee (addSystemAuthorization). Thus, if a user is first forbidden for all domains, and then gets authorized for all domains (addSystemAuthorization), then this automatically includes an implicit revocation of the "forbidden user" setting (removeForbiddenUser). An exclusion can be used when a user grants authorization to a community, but would like to exclude a single user. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function affects condition (3).
Parameters:
grantor - a User representing the grantor for the authorization
forbiddenUser - a User representing the forbidden user
PanamaException

removeForbiddenUser

public static void removeForbiddenUser(User grantor,
User forbiddenUser,
LocationPrivacyDomain domain)
                                throws PanamaException
This function lets a grantor remove an exclusion, representing a user who should NOT be granted authorization for a given domain. If no domain is specified, such an exclusion is exactly the opposite of a system authorization with respect to the given grantee (addSystemAuthorization). Thus, if a user is first forbidden for all domains, and then gets authorized for all domains (addSystemAuthorization), then this automatically includes an implicit revocation of the "forbidden user" setting (removeForbiddenUser). An exclusion can be used when a user grants authorization to a community, but would like to exclude a single user. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function affects condition (3).
Parameters:
grantor - a User representing the grantor for the authorization
forbiddenUser - a User representing the forbidden user
domain - a LocationPrivacyDomain representing the domain for the authorization (service or alert service)
PanamaException

isUserForbidden

public static boolean isUserForbidden(User grantor,
User anotherUser)
                               throws PanamaException
This function determines whether a grantor has stated an exclusion, representing a user who should NOT be granted authorization for a given domain. If no domain is specified, such an exclusion is exactly the opposite of a system authorization with respect to the given grantee (addSystemAuthorization). Thus, if a user is first forbidden for all domains, and then gets authorized for all domains (addSystemAuthorization), then this automatically includes an implicit revocation of the "forbidden user" setting (removeForbiddenUser). An exclusion can be used when a user grants authorization to a community, but would like to exclude a single user. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function determines condition (3).
Parameters:
grantor - a User representing the grantor for the authorization
Returns:
a boolean representing whether the user has forbidden status
PanamaException

isUserForbidden

public static boolean isUserForbidden(User grantor,
User anotherUser,
LocationPrivacyDomain domain)
                               throws PanamaException
This function determines whether a grantor has stated an exclusion, representing a user who should NOT be granted authorization for a given domain. If no domain is specified, such an exclusion is exactly the opposite of a system authorization with respect to the given grantee (addSystemAuthorization). Thus, if a user is first forbidden for all domains, and then gets authorized for all domains (addSystemAuthorization), then this automatically includes an implicit revocation of the "forbidden user" setting (removeForbiddenUser). An exclusion can be used when a user grants authorization to a community, but would like to exclude a single user. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function determines condition (3).
Parameters:
grantor - a User representing the grantor for the authorization
domain - a LocationPrivacyDomain representing the domain for the authorization (service or alert service)
Returns:
a boolean representing whether the user has forbidden status
PanamaException

removeAuthorization

public static void removeAuthorization(User grantor,
LocationPrivacyGrantee grantee,
LocationPrivacyDomain domain)
                                throws PanamaException
PanamaException

checkAuthorization

public static boolean checkAuthorization(User grantor,
User grantee,
LocationPrivacyDomain domain,
                                         java.util.Calendar posTime)
                                  throws PanamaException
This function determines whether a grantee is authorized to see the grantor in a given domain (service or alert service). For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function determines all 4 conditions.
Parameters:
grantor - a User representing the grantor for the authorization
grantee - a User representing the grantee for the authorization
domain - a LocationPrivacyDomain representing the domain for the authorization (service or alert service)
posTime - a Calendar representing the time of request
Returns:
a boolean representing whether or not the grantee has sufficient authorization
PanamaException

checkGrantorControlledAuthorization

public static boolean checkGrantorControlledAuthorization(User grantor,
User grantee,
LocationPrivacyDomain domain,
                                                          java.util.Calendar posTime)
                                                   throws PanamaException
This function determines part of whether a grantee is authorized to see the grantor in a given domain (service or alert service). Specifically, only the parameters affected by the grantor are checked. In contrast, the function checkAuthorization(User, User, LocationPrivacyDomain, Calendar) also checks whether MP is turned on on the system level. This is not checked here. For a grantee to be actually able to position the grantor, the following must apply: (1) MP must be enabled (2) The grantor must have granted access to the domain (service / alert service) (3) The grantor must not have excluded the specific user (grantee) for the specific domain (4) The grantor must have granted access to the grantee This function determines all 4 conditions.
Parameters:
grantor - a User representing the grantor for the authorization
grantee - a User representing the grantee for the authorization
domain - a LocationPrivacyDomain representing the domain for the authorization (service or alert service)
posTime - a Calendar representing the time of request
Returns:
a boolean representing whether or not the grantee has sufficient authorization
PanamaException

getEnabledGrantees

public static LocationPrivacyAuth[] getEnabledGrantees(User grantor)

getDisabledGrantees

public static LocationPrivacyAuth[] getDisabledGrantees(User grantor)

getGrantees

public static LocationPrivacyAuth[] getGrantees(User grantor)

getUserRelatedGrants

public static LocationPrivacyAuth[] getUserRelatedGrants(User user)

setMPEnabledForSystem

public static void setMPEnabledForSystem(boolean enabled)
                                  throws PanamaException
PanamaException

setCacheEnabledForSystem

public static void setCacheEnabledForSystem(boolean enabled)
                                     throws PanamaException
PanamaException

changeSystemAuthorization

public static void changeSystemAuthorization(LocationPrivacyAuth oldAuth,
LocationPrivacyGrantee newGrantee,
AuthPeriod newPeriod)
                                      throws PanamaException
PanamaException

changeSystemAuthorization

public static void changeSystemAuthorization(User grantor,
LocationPrivacyGrantee oldGrantee,
LocationPrivacyGrantee newGrantee,
AuthPeriod newPeriod)
                                      throws PanamaException
PanamaException

getNextAuthTime

public static java.util.Calendar getNextAuthTime(User grantor,
User grantee,
LocationPrivacyDomain domain,
                                                 java.util.Calendar posTime)
                                          throws PanamaException
PanamaException

Oracle Application Server Wireless Java API Reference
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.