org.apache.felix.eventadmin.impl.security
Class PermissionsUtil
java.lang.Object
org.apache.felix.eventadmin.impl.security.PermissionsUtil
public abstract class PermissionsUtil
- extends Object
Utility class for permissions.
- Author:
- Felix Project Team
- See Also:
org.apache.felix.eventadmin.impl.security.TopicPermissions
Method Summary |
static Object |
createPublishPermission(String topic)
Creates a TopicPermission for the given topic and the type PUBLISH
Note that a
java.lang.Object is returned in case creating a new TopicPermission
fails. |
static Object |
createSubscribePermission(String topic)
Creates a TopicPermission for the given topic and the type SUBSCRIBE
Note that a
java.lang.Object is returned in case creating a new TopicPermission
fails. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PermissionsUtil
public PermissionsUtil()
createPublishPermission
public static Object createPublishPermission(String topic)
- Creates a TopicPermission for the given topic and the type PUBLISH
Note that a
java.lang.Object is returned in case creating a new TopicPermission
fails. This assumes that Bundle.hasPermission is used in order to evaluate the
created Permission which in turn will return true if security is not supported
by the framework. Otherwise, it will return false due to receiving something
that is not a subclass of java.lang.SecurityPermission hence, this
combination ensures that access is granted in case a topic permission could
not be created due to missing security support by the framework.
- Parameters:
topic
- The target topic
- Returns:
- The created permission or a java.lang.Object in case the
permission could not be created.
- See Also:
org.apache.felix.eventadmin.impl.security.TopicPermissions#createTopicPermission(String)
,
TopicPermission
createSubscribePermission
public static Object createSubscribePermission(String topic)
- Creates a TopicPermission for the given topic and the type SUBSCRIBE
Note that a
java.lang.Object is returned in case creating a new TopicPermission
fails. This assumes that Bundle.hasPermission is used in order to evaluate the
created Permission which in turn will return true if security is not supported
by the framework. Otherwise, it will return false due to receiving something
that is not a subclass of java.lang.SecurityPermission hence, this
combination ensures that access is granted in case a topic permission could
not be created due to missing security support by the framework.
- Parameters:
topic
- The target topic
- Returns:
- The created permission or a java.lang.Object in case the
permission could not be created.
- See Also:
org.apache.felix.eventadmin.impl.security.TopicPermissions#createTopicPermission(String)
,
TopicPermission
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.