Search in sources :

Example 11 with RbacObjectInvalidException

use of org.apache.archiva.redback.rbac.RbacObjectInvalidException in project archiva by apache.

the class ArchivaRbacManager method saveOperation.

@Override
public Operation saveOperation(Operation operation) throws RbacObjectInvalidException, RbacManagerException {
    boolean allFailed = true;
    Exception lastException = null;
    for (RBACManager rbacManager : rbacManagersPerId.values()) {
        try {
            if (!rbacManager.isReadOnly()) {
                operation = rbacManager.saveOperation(operation);
                allFailed = false;
            }
        } catch (Exception e) {
            lastException = e;
        }
    }
    if (lastException != null && allFailed) {
        throw new RbacManagerException(lastException.getMessage(), lastException);
    }
    return operation;
}
Also used : RbacManagerException(org.apache.archiva.redback.rbac.RbacManagerException) AbstractRBACManager(org.apache.archiva.redback.rbac.AbstractRBACManager) RBACManager(org.apache.archiva.redback.rbac.RBACManager) RbacObjectNotFoundException(org.apache.archiva.redback.rbac.RbacObjectNotFoundException) RbacManagerException(org.apache.archiva.redback.rbac.RbacManagerException) RepositoryAdminException(org.apache.archiva.admin.model.RepositoryAdminException) RbacObjectInvalidException(org.apache.archiva.redback.rbac.RbacObjectInvalidException)

Aggregations

RepositoryAdminException (org.apache.archiva.admin.model.RepositoryAdminException)11 AbstractRBACManager (org.apache.archiva.redback.rbac.AbstractRBACManager)11 RBACManager (org.apache.archiva.redback.rbac.RBACManager)11 RbacManagerException (org.apache.archiva.redback.rbac.RbacManagerException)11 RbacObjectInvalidException (org.apache.archiva.redback.rbac.RbacObjectInvalidException)11 RbacObjectNotFoundException (org.apache.archiva.redback.rbac.RbacObjectNotFoundException)11