Package de.suse.swamp.core.util

Examples of de.suse.swamp.core.util.SecurityException


    public void cancelAllTasks(int wfid, String username) throws SecurityException,
        UnknownElementException, StorageException {

        Workflow wf = new WorkflowAPI().getWorkflow(wfid, username);
        if (!wf.hasRole(username, WorkflowRole.ADMIN)){
            throw new SecurityException("Must be admin to cancel all Tasks!");
        }
        TaskManager.cancelTasks(wfid, username);
    }
View Full Code Here


    }

    public int doGetTaskCacheSize(String username) throws SecurityException,
        UnknownElementException, StorageException {
        if (!SecurityManager.isGroupMember(SecurityManager.getUser(username), "swampadmins")){
            throw new SecurityException("No permission to read Taskcache!");
        }
        return TaskManager.getCacheSize();
    }  
View Full Code Here

    }  
   
   
    public void doEmptyTaskcache(String uname) throws StorageException, UnknownElementException, SecurityException {
        if (!SecurityManager.isGroupMember(SecurityManager.getUser(uname), "swampadmins")) {
            throw new SecurityException("Not allowed to truncate task-cache.");
        }
        TaskManager.clearCache();
    }
View Full Code Here

    WorkflowAPI wfapi = new WorkflowAPI();
        Workflow wf = wfapi.getWorkflow(e.getTargetWfId(), username);
       
        // FIXME: Users can send all events to a workflow...
        if (!wf.hasRole(username, WorkflowRole.USER)){
      throw new SecurityException("Need to be in role user to send event!");
    }
        EventManager.handleWorkflowEvent(e, username, history);
        return history;
  }
View Full Code Here

        for (Iterator it = l.iterator(); it.hasNext();) {
            Event e = (Event) it.next();
            Workflow wf = wfapi.getWorkflow(e.getTargetWfId(), username);
            if (!wf.hasRole(username, WorkflowRole.USER)) {
                throw new SecurityException("Need to be in role user to send event!");
            }
            EventManager.handleWorkflowEvent(e, username, history);
        }
        return history;
    }
View Full Code Here

  
   
   
    public void doEmptyDatacache(String uname) throws StorageException, UnknownElementException, SecurityException {
        if (!SecurityManager.isGroupMember(SecurityManager.getUser(uname), "swampadmins")) {
            throw new SecurityException("Not allowed to truncate data-cache.");
        }
        DataManager.clearCache();
    }
View Full Code Here

        DataManager.clearCache();
    }

    public int doGetDatacacheSize(String uname) throws StorageException, UnknownElementException, SecurityException {
        if (!SecurityManager.isGroupMember(SecurityManager.getUser(uname), "swampadmins")) {
            throw new SecurityException("Not allowed to read data-cache.");
        }
        return DatasetCache.getInstance().getCacheSize();
    }
View Full Code Here

TOP

Related Classes of de.suse.swamp.core.util.SecurityException

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.