Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) OSGi Alliance (2004, 2010). All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 package org.osgi.service.condpermadmin;
 
A list of Permissions guarded by a list of conditions with an access decision. Instances of this interface are obtained from the Conditional Permission Admin service.

Version:
$Id: df0eefb7d31ee0eb646b6cf640e3dd7d96cca181 $
Immutable:
Noimplement:
 
 public interface ConditionalPermissionInfo {
This string is used to indicate that a row in the Conditional Permission Table should return an access decision of "allow" if the conditions are all satisfied and at least one of the permissions is implied.

Since:
1.1
 
 	public final static String	ALLOW"allow";

This string is used to indicate that a row in the Conditional Permission Table should return an access decision of "deny" if the conditions are all satisfied and at least one of the permissions is implied.

Since:
1.1
 
 	public final static String	DENY"deny";

Returns the Condition Infos for the Conditions that must be satisfied to enable the Permissions.

Returns:
The Condition Infos for the Conditions in this Conditional Permission Info.
 
Returns the Permission Infos for the Permissions in this Conditional Permission Info.

Returns:
The Permission Infos for the Permissions in this Conditional Permission Info.
 
Removes this Conditional Permission Info from the Conditional Permission Table.

Since this method changes the underlying permission table, any ConditionalPermissionUpdates that were created prior to calling this method can no longer be committed.

 
 	void delete();

Returns the name of this Conditional Permission Info.

Returns:
The name of this Conditional Permission Info. This can be null if this Conditional Permission Info was created without a name.
 
Returns the access decision for this Conditional Permission Info.

Returns:
One of the following values:
  • allow - The access decision is "allow".
  • deny - The access decision is "deny".
Since:
1.1
Returns the string encoding of this ConditionalPermissionInfo in a form suitable for restoring this ConditionalPermissionInfo.

The encoded format is:

   access {conditions permissions} name
 
where access is the access decision, conditions is zero or more encoded conditions, permissions is one or more encoded permissions and name is the name of the ConditionalPermissionInfo.

name is optional. If name is present in the encoded string, it must quoted, beginning and ending with ". The name value must be encoded for proper parsing. Specifically, the ", \, carriage return, and line feed characters must be escaped using \", \\, \r, and \n, respectively.

The encoded string contains no leading or trailing whitespace characters. A single space character is used between access and { and between } and name, if name is present. All encoded conditions and permissions are separated by a single space character.

Returns:
The string encoding of this ConditionalPermissionInfo.
Since:
1.1
Returns the string representation of this ConditionalPermissionInfo. The string is created by calling the getEncoded method on this ConditionalPermissionInfo.

Returns:
The string representation of this ConditionalPermissionInfo.
Since:
1.1
Determines the equality of two ConditionalPermissionInfo objects. This method checks that specified object has the same access decision, conditions, permissions and name as this ConditionalPermissionInfo object.

Parameters:
obj The object to test for equality with this ConditionalPermissionInfo object.
Returns:
true if obj is a ConditionalPermissionInfo, and has the same access decision, conditions, permissions and name as this ConditionalPermissionInfo object; false otherwise.
Since:
1.1
	 boolean equals(Object obj);
 
Returns the hash code value for this object.

Returns:
A hash code value for this object.
Since:
1.1
	int hashCode();
New to GrepCode? Check out our FAQ X