Package com.sun.enterprise.admin.config

Examples of com.sun.enterprise.admin.config.MBeanConfigException


        }

        // can have either trust handler or trusted entity not both
        if (cName != null && (ipAdd != null || hostName != null || principal != null)) {
            String msg = _strMgr.getString("EitherTrustHandlerOrTrustedEntity");
            throw new MBeanConfigException(msg);
        }

        if (cName == null && (ipAdd == null && (hostName != null || principal != null || trustedAs != null))) {
            String msg = _strMgr.getString("IpAddMustforTrustedEntity");
            throw new MBeanConfigException(msg);
        }

        if (entityId != null && ipAdd == null) {
            String msg = _strMgr.getString("IpAddMustforTrustedEntity");
            throw new MBeanConfigException(msg);
        }

        // identity assertion trust
        IdentityAssertionTrust trustConfig = securityService.getIdentityAssertionTrustById(trustId);
        if (trustConfig != null)
        {
            String msg = _strMgr.getString("IdentityTrustAlreadyExists", trustId);
            throw new MBeanConfigException(msg);
        }

        // we have to create it
        trustConfig = new IdentityAssertionTrust();
        if (trustId == null)
View Full Code Here


        IdentityAssertionTrust trustConfig = securityService.getIdentityAssertionTrustById(id);

        if (trustConfig == null)
        {
            String msg = _strMgr.getString("IdentityTrustDoesntExist", id);
            throw new MBeanConfigException(msg);
        }

        securityService.removeIdentityAssertionTrust(trustConfig);

        return true;
View Full Code Here

            IdentityAssertionTrust trustConfig =
                   securityService.getIdentityAssertionTrustById(trustId);
            if (trustConfig == null)
            {
                String msg = _strMgr.getString("IdentityTrustDoesntExist", trustId);
                throw new MBeanConfigException(msg);
            }
            return getTrustedEntities(trustConfig);
        }

        // trustId is not specified, list all trust configs
View Full Code Here

            securityService.getIdentityAssertionTrustById(trustId);
        // invalid trustId was specified
        if (trustConfig == null)
        {
            String msg = _strMgr.getString("IdentityTrustDoesntExist", trustId);
            throw new MBeanConfigException(msg);
        }

        // check if a trust handler is already configured for this trust config
        TrustHandler tHandler = trustConfig.getTrustHandler();
        if (tHandler != null) {
            String msg = _strMgr.getString("TrustHandlerAlreadyExistsForTrustConfig", trustId);
            throw new MBeanConfigException(msg);
        }
           
        TrustedEntity tEntity = new TrustedEntity();
        if (id == null)
            id = generateEntityId(trustConfig);
View Full Code Here

            securityService.getIdentityAssertionTrustById(trustId);
        // invalid trustId was specified
        if (trustConfig == null)
        {
            String msg = _strMgr.getString("IdentityTrustDoesntExist", trustId);
            throw new MBeanConfigException(msg);
        }
        TrustedEntity[] entities = trustConfig.getTrustedEntity();
        // if its THE only trusted entity element, we might as well
        // remove the trust config itself
        if (entities.length==1 && entityId.equals(trustConfig.getTrustedEntity(0).getId()))
        {
            securityService.removeIdentityAssertionTrust(trustConfig);
            return true;
        }
        // get the trusted entity from the trust config and remove
        TrustedEntity tEntity = trustConfig.getTrustedEntityById(entityId);
        if (tEntity == null)
        {
            String msg = _strMgr.getString("TrustedEntityDoesntExist", entityId);
            throw new MBeanConfigException(msg);
        }
        trustConfig.removeTrustedEntity(tEntity);

        return true;
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.config.MBeanConfigException

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.