Package org.wso2.carbon.user.core.config

Examples of org.wso2.carbon.user.core.config.RealmConfigXMLProcessor


    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

        ds.setDriverClassName(dbDriver);
        ds.setUsername(dbUsername);
        ds.setPassword(dbPassword);

        try {
            RealmConfiguration realmConfig = new RealmConfigXMLProcessor()
                    .buildRealmConfigurationFromFile();
            UserStoreManager userStore = new JDBCUserStoreManager(ds, realmConfig, 0, true);
            userStore.updateCredentialByAdmin(username, password);
            System.out.println("Password updated successfully.");
        } catch (UserStoreException ex) {
View Full Code Here

        }

    }

    private RealmConfiguration loadDefaultRealmConfigs() throws UserStoreException {
        RealmConfigXMLProcessor processor = new RealmConfigXMLProcessor();
        RealmConfiguration config = processor.buildRealmConfigurationFromFile();
        return config;
    }
View Full Code Here

        RealmService realmService = ctx.getRealmService();
        TenantManager tenantManager = realmService.getTenantManager();

        String userMgtXML = getUserManagementConfigurationPath();

        RealmConfigXMLProcessor processor = new RealmConfigXMLProcessor();
        RealmConfiguration realmConfig = processor.buildRealmConfiguration(new FileInputStream(
                userMgtXML));

        Tenant tenant = new Tenant();
        tenant.setDomain("wso2.org");
        tenant.setRealmConfig(realmConfig);
View Full Code Here

        boolean active = result.getBoolean("UM_ACTIVE");
        Date createdDate = new Date(result.getTimestamp(
            "UM_CREATED_DATE").getTime());
        InputStream is = result.getBinaryStream("UM_USER_CONFIG");
                 
          RealmConfigXMLProcessor processor = new RealmConfigXMLProcessor();
          RealmConfiguration realmConfig = processor.buildRealmConfiguration(is);
          realmConfig.setTenantId(id);
         
        tenant = new Tenant();
        tenant.setId(id);
        tenant.setDomain(domain);
View Full Code Here

    private RealmConfiguration buildBootStrapRealmConfig() throws UserStoreException {
        this.parentElement = getConfigurationElement();
        OMElement realmElement = parentElement.getFirstChildWithName(new QName(
                UserCoreConstants.RealmConfig.LOCAL_NAME_REALM));
        RealmConfigXMLProcessor rmProcessor = new RealmConfigXMLProcessor();
        rmProcessor.setSecretResolver(parentElement);
        return rmProcessor.buildRealmConfiguration(realmElement);
    }
View Full Code Here

    public static final String JDBC_URL_PROPERTY_NAME = "url";

    public static RealmConfiguration buildRealmConfigWithJDBCConnectionUrl(InputStream inStream,
            String connectionUrl) throws UserStoreException {
        RealmConfigXMLProcessor builder = new RealmConfigXMLProcessor();
        RealmConfiguration realmConfig = builder.buildRealmConfiguration(inStream);
        Map<String, String> map = realmConfig.getRealmProperties();
        map.put(JDBC_URL_PROPERTY_NAME, connectionUrl);
        return realmConfig;
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.user.core.config.RealmConfigXMLProcessor

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.