Package org.apache.james

Examples of org.apache.james.AuthorizationException


     * have delete rights.
     */
    public synchronized boolean markDeleted(int msn, String user)
        throws AccessControlException, AuthorizationException {
        if (!hasDeleteRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to delete.");
        }

        //TBD
        return false;
    }
View Full Code Here


     * have delete rights.
     */
    public synchronized boolean markDeletedUID(int uid, String user)
        throws AccessControlException, AuthorizationException {
        if (!hasDeleteRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to delete.");
        }

        //TBD
        return false;
    }
View Full Code Here

     * have delete rights.
     */
    public synchronized MessageAttributes getMessageAttributes(int msn, String user)
        throws AccessControlException, AuthorizationException {
        if (!hasReadRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to read.");
        }
        if (msn > sequence.size()) {
            return null;
        } else {
            int uid = ((Integer)sequence.get(msn - 1)).intValue();
View Full Code Here

     * have delete rights.
     */
    public synchronized MessageAttributes getMessageAttributesUID(int uid, String user)
        throws AccessControlException, AuthorizationException {
        if (!hasReadRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to read.");
        }
        SimpleMessageAttributes response = null;
        if (sequence.contains(new Integer(uid))) {
            ObjectInputStream inAttrs = null;
            try {
View Full Code Here

     * have delete rights.
     */
    public boolean updateMessageAttributes(MessageAttributes attrs, String user)
        throws AccessControlException, AuthorizationException {
        if (!hasKeepSeenRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to store flags.");
        }
        int uid = attrs.getUID();
        if (sequence.contains(new Integer(uid))) {

            // Really, we should check whether the exact change is authorized.
View Full Code Here

     * have read rights.
     */
    public synchronized  String getFlags(int msn, String user)
        throws AccessControlException, AuthorizationException {
        if (!hasReadRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to read.");
        }
        if (msn > sequence.size()) {
            return null;
        } else {
            int uid = ((Integer)sequence.get(msn - 1)).intValue();
View Full Code Here

     * have read rights.
     */
    public synchronized  String getFlagsUID(int uid, String user)
        throws AccessControlException, AuthorizationException {
        if (!hasReadRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to read.");
        }
        if (!sequence.contains(new Integer(uid))) {
            return null;
        } else {
            Flags flags = readFlags(uid);
View Full Code Here

     */
    public synchronized  boolean setFlags(int msn, String user, String request)
        throws AccessControlException, AuthorizationException,
               IllegalArgumentException {
        if (!hasKeepSeenRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to store any flags.");
        }
        if (msn > sequence.size()) {
            return false;
        } else {
            int uid = ((Integer)sequence.get(msn - 1)).intValue();
View Full Code Here

     */
    public synchronized boolean setFlagsUID(int uid, String user, String request)
        throws AccessControlException, AuthorizationException,
               IllegalArgumentException {
        if (!hasKeepSeenRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to store any flags.");
        }
        if ((request.toUpperCase().indexOf("DELETED") != -1) && (!hasDeleteRights(user))) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to delete.");
        }
        if (sequence.contains(new Integer(uid))) {

            Flags flags = readFlags(uid);
            boolean wasRecent = flags.isRecent();
View Full Code Here

     * have delete rights.
     */
    public synchronized boolean expunge(String user)
        throws AccessControlException, AuthorizationException {
        if (!hasDeleteRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to delete.");
        }
        Iterator it = messagesForDeletion.iterator();
        while (it.hasNext()) {
            Integer uidObj = (Integer)it.next();
            int uid = uidObj.intValue();
View Full Code Here

TOP

Related Classes of org.apache.james.AuthorizationException

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.