Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.IdentityAssertionTrust


    throws Exception
    {
        final Target target = getTarget(targetName);
//        check1ToN(target);
        SecurityService securityService = getSecurityServiceConfigBean(target.getConfigTarget().getName());
        IdentityAssertionTrust trustConfig =
            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.config.serverbeans.IdentityAssertionTrust

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.