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

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


                rundata.setRedirectURI(duri.toString());
                resetForm(rundata);
            }
            else
            {
                BaseSecurityEntry existingSecurityEntry =
                    (BaseSecurityEntry) Registry.getEntry(
                        Registry.SECURITY,
                        securityName);

                if (existingSecurityEntry != null)
                {
                    throw new EntityExistsException(
                        "SecurityEntry: " + securityName + " Already Exists!");
                }

                String title = rundata.getParameters().getString("title");
                String description =
                    rundata.getParameters().getString("description");

                BaseSecurityEntry securityEntry = new BaseSecurityEntry();
                securityEntry.setName(securityName);

                setSecurityFields(rundata, securityEntry);

                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)
View Full Code Here

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

            if (securityEntry != null)
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);

                    securityEntry.getAccesses().add(securityAccess);

                    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
                        {
                            Log.error(
                                "Access Index: " + i + " is out of range");
                        }
                    }
                       
                    Iterator deleteIter = deleteList.iterator();
                    while(deleteIter.hasNext())
                    {
                      SecurityAccess sa = (SecurityAccess)deleteIter.next();
                      securityEntry.getAccesses().remove(sa);
                    }
                    
                    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);
                    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

        System.out.println("Security Group Registry Cache Test done.");       
    }

    private SecurityEntry createSecurityEntry(String name)
    {
        BaseSecurityEntry securityEntry = new BaseSecurityEntry();
        securityEntry.setName(name);
        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.