Package org.jasig.portal

Examples of org.jasig.portal.AuthorizationException


            { ps.close(); }
    }
    catch (Exception ex)
    {
        log.error("Exception deleting permission [" + perm + "]", ex);
        throw new AuthorizationException("Problem deleting Permission " + perm);
    }
    finally
        { RDBMServices.releaseConnection(conn); }
}
View Full Code Here


    }
    catch (Exception ex)
    {
        log.error("Exception determining whether " +
                "permission [" + perm + "] exists in database.", ex);
        throw new AuthorizationException("RDBMPermissionImpl.existsInDatabase(): " + ex);
    }
    finally
    {
        RDBMServices.releaseConnection(conn);
    }
View Full Code Here

                if ( rc != 1 )
                {
                    String errMsg = "Problem adding " + perms[i] + " RC: " + rc;
                    log.error( errMsg);
                    RDBMServices.rollback(conn);
                    throw new AuthorizationException(errMsg);
                }
            }
        }
        finally
            { ps.close(); }
View Full Code Here

            { stmnt.close(); }
    }
    catch (SQLException sqle)
    {
        log.error("Problem retrieving permissions", sqle);
        throw new AuthorizationException("Problem retrieving Permissions", sqle);
    }
    finally
        { RDBMServices.releaseConnection(conn); }

    return ((IPermission[])perms.toArray(new IPermission[perms.size()]));
View Full Code Here

            primUpdate(perms);
        }
        catch (Exception ex)
        {
            log.error("Exception updating permissions " + perms, ex);
            throw new AuthorizationException(ex);
        }
    }
}
View Full Code Here

            { ps.close(); }
    }
    catch (Exception ex)
    {
        log.error("Exception updating permission [" + perm + "]", ex);
        throw new AuthorizationException("Problem updating Permission " + perm);
    }
    finally
        { RDBMServices.releaseConnection(conn); }
}
View Full Code Here

      PropertiesManager.getProperty("org.jasig.portal.security.IPermissionPolicy.defaultImplementation");
    if ( policyName == null )
    {
        eMsg = "AuthorizationTester.initializeDefaultPermissionPolicy(): No entry for org.jasig.portal.security.IPermissionPolicy.defaultImplementation in portal.properties.";
        print (eMsg);
        throw new AuthorizationException(eMsg);
    }

    try
    {
        defaultPermissionPolicy = (IPermissionPolicy)Class.forName(policyName).newInstance();
    }
    catch (Exception e)
    {
        eMsg = "AuthorizationTester.initializeDefaultPermissionPolicy(): Problem creating default permission policy... " + e.getMessage();
        print(eMsg);
        throw new AuthorizationException(eMsg);
    }
}
View Full Code Here

      PropertiesManager.getProperty("org.jasig.portal.security.IPermissionStore.implementation");
    if ( factoryName == null )
    {
        eMsg = "AuthorizationTester.initializePermissionStore(): No entry for org.jasig.portal.security.IPermissionStore.implementation portal.properties.";
        print(eMsg);
        throw new AuthorizationException(eMsg);
    }

    try
    {
        permissionStore = (IPermissionStore)Class.forName(factoryName).newInstance();
    }
    catch (Exception e)
    {
        eMsg = "AuthorizationTester.initializePermissionStore(): Problem creating permission store... " + e.getMessage();
        print(eMsg);
        throw new AuthorizationException(eMsg);
    }
}
View Full Code Here

    if ( perms.length == 1 )
        { return permissionIsGranted(perms[0]); }

    // Should never be.
    if ( perms.length > 1 )
        { throw new AuthorizationException("Duplicate permissions for: " + perms[0]); }

    // No permissions for this principal.  Check inherited permissions.
    boolean hasPermission = false;
    try
    {
        Iterator i = service.getGroupMember(principal).getAllContainingGroups();
        while ( i.hasNext() && ! hasPermission )
        {
            IAuthorizationPrincipal prn = service.newPrincipal( (IGroupMember) i.next() );
            hasPermission = primDoesPrincipalHavePermission(prn, owner, activity, target, service);
         }
    }
    catch ( GroupsException ge )
        { throw new AuthorizationException(ge); }

    return hasPermission;
}
View Full Code Here

        { return false; }

    if ( perms.length == 1 )
        { return permissionIsGranted(perms[0]); }
    else
        { throw new AuthorizationException("Duplicate permissions for: " + perms[0]); }
}
View Full Code Here

TOP

Related Classes of org.jasig.portal.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.