Package org.apache.jetspeed.security

Examples of org.apache.jetspeed.security.SecurityDomain


                    if (jsDomain.getOwnerDomain().equals(SecurityDomain.SYSTEM_NAME)){
                        ownerDomainId=defaultDomainId;
                    } else if (jsDomain.getOwnerDomain().equals(SecurityDomain.SYSTEM_NAME)) {
                        ownerDomainId=systemDomainId;
                    } else {
                        SecurityDomain ownerDomain = domainAccessManager.getDomainByName(jsDomain.getOwnerDomain());
                        if (ownerDomain == null){
                            throw new SerializerException(SerializerException.CREATE_OBJECT_FAILED.create(new String[] { "SecurityDomain","Could not find owner domain with name "+jsDomain.getOwnerDomain()+"for domain with name "+jsDomain.getName()}));
                        }
                        ownerDomainId=ownerDomain.getDomainId();
                    }
                } else {
                    // remote domains always need an owner domain. Set the default domain if owner domain is not specified
                    if (jsDomain.isRemote()){
                        ownerDomainId=defaultDomainId;
View Full Code Here


       
        // Need to ensure required Security Domains are setup.
        domainStorageManager = (SecurityDomainStorageManager) scm.getComponent(SecurityDomainStorageManager.class.getName());
        domainAccessManager = (SecurityDomainAccessManager) scm.getComponent("org.apache.jetspeed.security.spi.SecurityDomainAccessManager");

        SecurityDomain domain = domainAccessManager.getDomainByName(SecurityDomain.SYSTEM_NAME);
        if (domain == null){
           
            SecurityDomainImpl newDomain = new SecurityDomainImpl();
            newDomain.setName(SecurityDomain.SYSTEM_NAME);
            domainStorageManager.addDomain(newDomain);
View Full Code Here

    protected Long getDefaultSecurityDomainId()
    {
        if (defaultSecurityDomainId == null)
        {
            SecurityDomain d = getDomainByName(SecurityDomain.DEFAULT_NAME);
            if (d != null)
            {
                // cache real default security domain id
                defaultSecurityDomainId = d.getDomainId();
            }
            else
            {
                throw new IllegalStateException("The default security domain could not be found.");
            }
View Full Code Here

            }
        }
    }

    protected SecurityDomain checkDomainExistsOtherwiseCreate(String domainName) throws SecurityException{
        SecurityDomain domain = domainAccessManager.getDomainByName(domainName);
        if (domain == null){
            SecurityDomainImpl newDomain = new SecurityDomainImpl();
            newDomain.setName(domainName);
            newDomain.setEnabled(true);
            newDomain.setRemote(false);
View Full Code Here

                    if (jsDomain.getOwnerDomain().equals(SecurityDomain.SYSTEM_NAME)){
                        ownerDomainId=defaultDomainId;
                    } else if (jsDomain.getOwnerDomain().equals(SecurityDomain.SYSTEM_NAME)) {
                        ownerDomainId=systemDomainId;
                    } else {
                        SecurityDomain ownerDomain = domainAccessManager.getDomainByName(jsDomain.getOwnerDomain());
                        if (ownerDomain == null){
                            throw new SerializerException(SerializerException.CREATE_OBJECT_FAILED.create(new String[] { "SecurityDomain","Could not find owner domain with name "+jsDomain.getOwnerDomain()+"for domain with name "+jsDomain.getName()}));
                        }
                        ownerDomainId=ownerDomain.getDomainId();
                    }
                } else {
                    // remote domains always need an owner domain. Set the default domain if owner domain is not specified
                    if (jsDomain.isRemote()){
                        ownerDomainId=defaultDomainId;
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.security.SecurityDomain

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.