Package org.osgi.service.useradmin

Examples of org.osgi.service.useradmin.UserAdminPermission


    public Object get(Object key) {
        if (key instanceof String) {
            SecurityManager sm = System.getSecurityManager();
            if(null!=sm){
                sm.checkPermission
                  (new UserAdminPermission((String) key,
                                           UserAdminPermission.GET_CREDENTIAL));
            }
            return super.get(key);
        }
        throw new IllegalArgumentException("The key must be a String, got "
View Full Code Here


    public boolean hasCredential(String key, Object value) {
        SecurityManager sm = System.getSecurityManager();
        if(null!=sm){
            sm.checkPermission
              (new UserAdminPermission(key,
                                       UserAdminPermission.GET_CREDENTIAL));
        }
        Object val = creds.get(key);
        if (val instanceof byte[] && value instanceof byte[]) {
            return arraysEquals((byte[]) val, (byte[]) value);
View Full Code Here

        // synchronized (role) {
        if (key instanceof String) {
            SecurityManager sm = System.getSecurityManager();
            if(null!=sm){
                sm.checkPermission
                  (new UserAdminPermission( (String) key, getChangeAction()));
            }
            Object res = ht.remove(key);
            Activator.uai.sendEvent(UserAdminEvent.ROLE_CHANGED, role);
            // role.um.save();
            return res;
View Full Code Here

        // synchronized (role) {
        if (key instanceof String) {
            SecurityManager sm = System.getSecurityManager();
            if(null!=sm){
                sm.checkPermission
                  (new UserAdminPermission( (String) key, getChangeAction()));
            }
            Object res;
            // value of type byte[] or String is ok
            if (value instanceof byte[]) {
                res = ht.put(key, ((byte[]) value).clone());
View Full Code Here

     * @throws SecurityException in case the caller has not the right permissions to perform the action.
     */
    private void checkPermissions(String key, String action) throws SecurityException {
        SecurityManager securityManager = System.getSecurityManager();
        if (securityManager != null) {
            securityManager.checkPermission(new UserAdminPermission(key, action));
        }
    }
View Full Code Here

     * @throws SecurityException in case the caller has not the right permissions to perform the action.
     */
    private void checkPermissions() throws SecurityException {
        SecurityManager securityManager = System.getSecurityManager();
        if (securityManager != null) {
            securityManager.checkPermission(new UserAdminPermission(UserAdminPermission.ADMIN, null));
        }
    }
View Full Code Here

     * @throws SecurityException in case the caller has not the right permissions to perform the action.
     */
    private void checkPermissions() throws SecurityException {
        SecurityManager securityManager = System.getSecurityManager();
        if (securityManager != null) {
            securityManager.checkPermission(new UserAdminPermission(UserAdminPermission.ADMIN, null));
        }
    }
View Full Code Here

TOP

Related Classes of org.osgi.service.useradmin.UserAdminPermission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.