Package org.apache.jetspeed.om.registry.base

Examples of org.apache.jetspeed.om.registry.base.BaseSecurityEntry


            && (mode.equals(SecurityConstants.PARAM_MODE_DELETE)
                || mode.equals(SecurityConstants.PARAM_MODE_UPDATE)))
        {
            String securityName =
                rundata.getParameters().getString("security_name");
            BaseSecurityEntry securityEntry =
                (BaseSecurityEntry) Registry.getEntry(
                    Registry.SECURITY,
                    securityName);

            String subMode = rundata.getParameters().getString("subMode");
            if (subMode != null)
            {
                context.put("subMode", subMode);
                int accessIndex =
                    rundata.getParameters().getInt("access_index", -1);
                if (accessIndex != -1)
                {
                    context.put("accessIndex", new Integer(accessIndex));
                    accessIndex--;
                    BaseSecurityAccess securityAccess =
                        (BaseSecurityAccess) securityEntry.getAccesses().get(
                            accessIndex);
                    context.put("securityAccess", securityAccess);
                }
            }
View Full Code Here


    {
        try
        {
            String securityName =
                rundata.getParameters().getString("security_name");
            BaseSecurityEntry securityEntry =
                (BaseSecurityEntry) Registry.getEntry(
                    Registry.SECURITY,
                    securityName);

            if (securityEntry != null)
            {
                String action =
                    rundata.getParameters().getString("access_action");

                if (action != null && action.length() > 0)
                {
                    BaseSecurityAccess securityAccess =
                        new BaseSecurityAccess();
                    securityAccess.setAction(action);

                    addAllow(rundata, securityAccess);

                    Vector accesses = securityEntry.getAccesses();
                    accesses.add(securityAccess);
                    securityEntry.setAccesses(accesses);

                    Registry.addEntry(Registry.SECURITY, securityEntry);
                    clearUserData(rundata);
                }
                else
View Full Code Here

    {
        try
        {
            String securityName =
                rundata.getParameters().getString("security_name");
            BaseSecurityEntry securityEntry =
                (BaseSecurityEntry) Registry.getEntry(
                    Registry.SECURITY,
                    securityName);
            if (securityEntry != null)
            {
                int accessIndex =
                    rundata.getParameters().getInt("access_index", -1);
                accessIndex--;
                String action =
                    rundata.getParameters().getString("access_action");

                if (accessIndex >= 0
                    && accessIndex < securityEntry.getAccesses().size())
                {
                    BaseSecurityAccess securityAccess =
                        (BaseSecurityAccess) securityEntry.getAccesses().get(
                            accessIndex);
                    securityAccess.setAction(action);

                    Registry.addEntry(Registry.SECURITY, securityEntry);
                    clearUserData(rundata);
View Full Code Here

    {
        try
        {
            String securityName =
                rundata.getParameters().getString("security_name");
            BaseSecurityEntry securityEntry =
                (BaseSecurityEntry) Registry.getEntry(
                    Registry.SECURITY,
                    securityName);
            if (securityEntry != null)
            {
                int[] accessIndexes =
                    rundata.getParameters().getInts("access_index");

                if (accessIndexes != null && accessIndexes.length > 0)
                {
                    ArrayList deleteList = new ArrayList();

                    for (int i = 0; i < accessIndexes.length; i++)
                    {
                        int accessIndex = accessIndexes[i];
                        accessIndex--;

                        if (accessIndex >= 0
                            && accessIndex < securityEntry.getAccesses().size())
                        {
                            deleteList.add(
                                securityEntry.getAccesses().get(accessIndex));
                        }
                        else
                        {
                            logger.error(
                                "Access Index: " + i + " is out of range");
                        }
                    }


                    Vector accesses = securityEntry.getAccesses();
                    Iterator deleteIter = deleteList.iterator();
                    while (deleteIter.hasNext())
                    {
                        SecurityAccess sa = (SecurityAccess) deleteIter.next();
                        accesses.remove(sa);
                    }
                   
                    securityEntry.setAccesses(accesses);

                    Registry.addEntry(Registry.SECURITY, securityEntry);
                    clearUserData(rundata);
                }
                else
View Full Code Here

    {
        try
        {
            String securityName =
                rundata.getParameters().getString("security_name");
            BaseSecurityEntry securityEntry =
                (BaseSecurityEntry) Registry.getEntry(
                    Registry.SECURITY,
                    securityName);
            if (securityEntry != null)
            {
                int accessIndex =
                    rundata.getParameters().getInt("access_index", -1);
                accessIndex--;

                if (accessIndex >= 0
                    && accessIndex < securityEntry.getAccesses().size())
                {
                    BaseSecurityAccess securityAccess =
                        (BaseSecurityAccess) securityEntry.getAccesses().get(
                            accessIndex);
                    addAllow(rundata, securityAccess);
                    Registry.addEntry(Registry.SECURITY, securityEntry);
                    clearUserData(rundata);
                }
View Full Code Here

    {
        try
        {
            String securityName =
                rundata.getParameters().getString("security_name");
            BaseSecurityEntry securityEntry =
                (BaseSecurityEntry) Registry.getEntry(
                    Registry.SECURITY,
                    securityName);
            if (securityEntry != null)
            {
                int accessIndex =
                    rundata.getParameters().getInt("access_index", -1);
                accessIndex--;

                if (accessIndex >= 0
                    && accessIndex < securityEntry.getAccesses().size())
                {
                    BaseSecurityAccess securityAccess =
                        (BaseSecurityAccess) securityEntry.getAccesses().get(
                            accessIndex);

                    String allowType =
                        rundata.getParameters().getString(
                            "allow_type",
View Full Code Here

        accessElement.setAction(action);
        accessElement.setAllows( allowVector );
        Vector accessVector = new Vector();
        accessVector.addElement(accessElement);
       
        BaseSecurityEntry securityEntry = new BaseSecurityEntry();
        securityEntry.setName(name);
        securityEntry.setAccesses( accessVector);
        return securityEntry;
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.registry.base.BaseSecurityEntry

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.