All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dvb.net.rc.RCPermission Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package org.dvb.net.rc;

/**
 * This class is for return channel set-up permissions. An RCPermission 
 * contains a name, but no actions list.
 * 

* The permission name can be "target:default", which indicates * the permission to use the default connection parameters. *

* The permission name can also be "target:<phone number>", which * indicates the permission to use the specified phone number in * the connection set-up (ConnectionRCInterface.setTarget(ConnectionParameters) * method). *

* A wildcard may be used at the end of the permission name. In that * case, all phone numbers starting with the number before the wildcard * are included in the permission. * A "+" may be used at the start of the phone number to indicate a phone number * including the international country code. *

* Examples: *

    *
  • * target:0206234342 (Permission to dial the specified phone number) *
  • *
  • * target:020* (Permission to dial phone numbers starting with 020) *
  • *
  • * target:* (Permission to dial all phone numbers, including the default) *
  • *
*

* Note: ConnectionRCInterface.reserve(ResourceClient, Object) will throw a * SecurityException if the application is not allowed to set-up a connection * over the return channel at all (i.e., there is no valid target allowed). */ public class RCPermission extends java.security.BasicPermission { /** * Creates a new RCPermission with the specified name. The * name is the symbolic name of the RCPermission. * * @param name the name of the RCPermission */ public RCPermission(String name) { super(name); } /** * Creates a new RCPermission object with the specified * name. The name is the symbolic name of the RCPermission, * and the actions String is unused and should be null. * This constructor exists for use by the Policy object to * instantiate new Permission objects. * * @param name the name of the RCPermission * @param actions should be null. */ public RCPermission(String name, String actions) { super(name,actions); } /** * Checks if this RCPermission "implies" the specified Permission. *

* More specifically, this returns true if and only if: *

    *
  • p is an instance of RCPermission, and *
  • p's name is implied by the name of this permission, as described * by the wildcarding rules specified in the the description of * this class. *
* * @param p The Permission to check against. * @return true if the specified Permission is implied by this object; * false otherwise. **/ public boolean implies(java.security.Permission p) { return false; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy