Package org.wso2.carbon.security.config

Examples of org.wso2.carbon.security.config.SecurityConfigAdmin


    }

    public byte[] getProcessImage(String processId) {

        QName qName = decode(processId);
        SVGInterface svg = createSVG(qName);
        return svg.toPNGBytes();
    }
View Full Code Here


    private SVGInterface createSVG(QName qName) {

        // generate new
        InputStream in = getBpelDescriptor(qName);

        SVGInterface svg = null;

        try {
            svg = BPEL2SVGUtil.generate(in);

            if (svg == null)
View Full Code Here

   
    protected static SVGImpl generateSVGImpl(java.io.InputStream is) throws java.io.IOException {
      byte[] b=new byte[is.available()];
      is.read(b);
   
      BPELInterface bpel = new BPELImpl();
        OMElement bpelStr = bpel.load(new String(b));
       
        bpel.processBpelString(bpelStr);

        LayoutManager layoutManager = BPEL2SVGFactory.getInstance().getLayoutManager();
        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here

   * @param transformer The optional image transformer
   * @throws java.io.IOException Failed to generate the representation
   */
    public static void generate(java.io.InputStream is, java.io.OutputStream os,
                SVGImageTransformer transformer) throws java.io.IOException {
        SVGImpl svg = generateSVGImpl(is);
       
        if (transformer == null) {
          String str=svg.getHeaders()+svg.generateSVGString();
          os.write(str.getBytes());
        } else {
          transformer.transform(svg, os);
        }
    }
View Full Code Here

        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here

            ConfigurationContext mainConfigCtx = configContextService.getServerConfigContext();
            AxisConfiguration mainAxisConfig = mainConfigCtx.getAxisConfiguration();
            BundleContext bundleCtx = ctxt.getBundleContext();          
            mainAxisConfig.engageModule(POX_SECURITY_MODULE);
            bundleCtx.registerService(SecurityConfigAdmin.class.getName(),
                                      new SecurityConfigAdmin(mainAxisConfig,
                                                              registryService.getConfigSystemRegistry(),
                                                              null),
                                      null);
            bundleCtx.registerService(Axis2ConfigurationContextObserver.class.getName(),
                                      new SecurityAxis2ConfigurationContextObserver(),
View Full Code Here

    public static void configureService(String serviceName) throws IdentityProviderException {
        try {
            AxisConfiguration axisConfig = IdentitySTSMgtServiceComponent.getConfigurationContext()
                    .getAxisConfiguration();

            SecurityConfigAdmin admin = new SecurityConfigAdmin(axisConfig,
                    IdentitySTSMgtServiceComponent.getRegistryService().getConfigSystemRegistry(),
                    new IPPasswordCallbackHandler());

            ServerConfiguration serverConfig = ServerConfiguration.getInstance();
            String ksName = serverConfig.getFirstProperty("Security.KeyStore.Location");
            ksName = ksName.substring(ksName.lastIndexOf("/") + 1);

            if (log.isDebugEnabled()) {
                log.debug("Applying identity security policy for service " + serviceName);
            }
           
            if (IdentityProviderUtil.isIntial()) {

                if (IdentityConstants.SERVICE_NAME_STS_UT.equals(serviceName)) {
                    admin.applySecurity(IdentityConstants.SERVICE_NAME_STS_UT, "scenario19", null, null,
                            null, null);
                } else if (IdentityConstants.OpenId.SERVICE_NAME_STS_OPENID.equals(serviceName)) {
                    admin.applySecurity(IdentityConstants.OpenId.SERVICE_NAME_STS_OPENID,
                            "scenario19", null, null, null, null);
                } else if (IdentityConstants.SERVICE_NAME_STS_IC.equals(serviceName)) {
                    admin.applySecurity(IdentityConstants.SERVICE_NAME_STS_IC, "scenario18",
                            null, new String[] { ksName }, ksName, null);
                } else if (IdentityConstants.OpenId.SERVICE_NAME_STS_IC_OPENID.equals(serviceName)) {
                    admin.applySecurity(IdentityConstants.OpenId.SERVICE_NAME_STS_IC_OPENID,
                            "scenario18", null, new String[] { ksName }, ksName, null);
                } else if (IdentityConstants.SERVICE_NAME_STS_UT_SYMM.equals(serviceName)) {
                    admin.applySecurity(IdentityConstants.SERVICE_NAME_STS_UT_SYMM, "scenario18",
                            null, new String[] { ksName }, ksName, null);
                } else if (IdentityConstants.SERVICE_NAME_STS_IC_SYMM.equals(serviceName)) {
                    admin.applySecurity(IdentityConstants.SERVICE_NAME_STS_IC_SYMM, "scenario18",
                            null, new String[] { ksName }, ksName, null);
                }
            }
           
            if (IdentityConstants.SERVICE_NAME_STS_UT.equals(serviceName)) {
View Full Code Here

        try {
            ServerConfiguration serverConfig = ServerConfiguration.getInstance();
            String ksName = serverConfig.getFirstProperty("Security.KeyStore.Location");
            ksName = ksName.substring(ksName.lastIndexOf("/") + 1);

            SecurityConfigAdmin admin = new SecurityConfigAdmin(config, registry,
                    new IPPasswordCallbackHandler());
            if (log.isDebugEnabled()) {
                log.debug("Applying identity security policy for Identity STS services");
            }

            if (IdentityProviderUtil.isIntial()) {
                if (axisConfig.getService(IdentityConstants.SERVICE_NAME_STS_UT) != null) {
                    admin.applySecurity(IdentityConstants.SERVICE_NAME_STS_UT, "scenario19", null, null,
                            null, null);
                }
                if (axisConfig.getService(IdentityConstants.OpenId.SERVICE_NAME_STS_OPENID) != null) {
                    admin.applySecurity(IdentityConstants.OpenId.SERVICE_NAME_STS_OPENID,
                            "scenario19", null, null, null, null);
                }
                if (axisConfig.getService(IdentityConstants.SERVICE_NAME_STS_IC) != null) {
                    admin.applySecurity(IdentityConstants.SERVICE_NAME_STS_IC, "scenario18",
                            null, new String[] { ksName }, ksName, null);
                }
                if (axisConfig.getService(IdentityConstants.OpenId.SERVICE_NAME_STS_IC_OPENID) != null) {
                    admin.applySecurity(IdentityConstants.OpenId.SERVICE_NAME_STS_IC_OPENID,
                            "scenario18", null, new String[] { ksName }, ksName, null);
                }
                if (axisConfig.getService(IdentityConstants.SERVICE_NAME_STS_UT_SYMM) != null) {
                    admin.applySecurity(IdentityConstants.SERVICE_NAME_STS_UT_SYMM, "scenario18",
                            null, new String[] { ksName }, ksName, null);
                }
                if (axisConfig.getService(IdentityConstants.SERVICE_NAME_STS_IC_SYMM) != null) {
                    admin.applySecurity(IdentityConstants.SERVICE_NAME_STS_IC_SYMM, "scenario18",
                            null, new String[] { ksName }, ksName, null);
                }
            }         

            if (axisConfig.getService(IdentityConstants.SERVICE_NAME_STS_UT) != null) {
View Full Code Here

public class SecurityConfigAdminService extends AbstractAdmin {

    public void activateUsernameTokenAuthentication(String serviceName, String[] userGroups)
            throws SecurityConfigException {
        SecurityConfigAdmin admin = new SecurityConfigAdmin(getUserRealm(), getConfigSystemRegistry(), getAxisConfig());
        admin.activateUsernameTokenAuthentication(serviceName, userGroups);

    }
View Full Code Here

    }

    public void disableSecurityOnService(String serviceName) throws SecurityConfigException {

        SecurityConfigAdmin admin = new SecurityConfigAdmin(getUserRealm(), getConfigSystemRegistry(), getAxisConfig());
        admin.disableSecurityOnService(serviceName);
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.security.config.SecurityConfigAdmin

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.