Package org.wso2.carbon.registry.app

Examples of org.wso2.carbon.registry.app.RemoteRegistry


    }

    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

    private int ownerTenantId;
    private CacheManagerFactoryImpl cacheManagerFactory;

    public HazelcastCacheManager(String name, CacheManagerFactoryImpl cacheManagerFactory) {
        this.cacheManagerFactory = cacheManagerFactory;
        CarbonContext carbonContext = CarbonContext.getThreadLocalCarbonContext();
        if (carbonContext == null) {
            throw new IllegalStateException("CarbonContext cannot be null");
        }
        ownerTenantDomain = carbonContext.getTenantDomain();
        if (ownerTenantDomain == null) {
            throw new IllegalStateException("Tenant domain cannot be " + ownerTenantDomain);
        }
        ownerTenantId = carbonContext.getTenantId();
        if (ownerTenantId == MultitenantConstants.INVALID_TENANT_ID) {
            throw new IllegalStateException("Tenant ID cannot be " + ownerTenantId);
        }
        this.name = name;
        status = Status.STARTED;
View Full Code Here

            if (configurationFrom == ConfigurationFromEnum.REMOTE_RESOURCE) {
                System.setProperty("javax.net.ssl.trustStore", "CARBON_HOME/resources/security/client-truststore.jks");
                System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
                System.setProperty("javax.net.ssl.trustStoreType","JKS");

                RemoteRegistry remoteConfigurationRegisitry = new RemoteRegistry(new URL(aspectConfigurationRegistryURL),
                    aspectConfigurationRegistryUsername,
                    aspectConfigurationRegistryPassword);

                Resource configurationResource = remoteConfigurationRegisitry.get(aspectConfigurationLocation);
                String xmlContent = new String((byte[])configurationResource.getContent());  
                OMElement checklistConfiguration = AXIOMUtil.stringToOM(xmlContent);
                Iterator stateElements = checklistConfiguration.getChildElements();
                                                          /*
                <lifecycle-configuration>
View Full Code Here

            if(password==null){
                handleException("Registry password is null");
            }

            log.info("Connecting to the remote registry " + registryURL);
            registry = new RemoteRegistry(new URL(registryURL), username, password);
            super.registry=registry;
            if (registry == null) {
                log.fatal("Unable to connect to the remote registry at : " + registryURL);
            } else {
                resTopicIndex = registry.get(getTopicIndexPath()); // call the topic index
View Full Code Here

import org.wso2.carbon.registry.core.session.UserRegistry;
public class RegistryRepositoryFactory implements RepositoryFactory{
    private Repository regRepo;
    public Repository getRepository(Map map) throws RepositoryException {

        RemoteRegistry remoteRegistry;
        Registry registry; // an admin registry
        try {
            RemoteRegistryService remoteRegistryService = new RemoteRegistryService((String)map.get("registryURL"),(String)map.get("userName"),(String)map.get("password"));
            if(regRepo == null) {
View Full Code Here

    String passWord;
    String fromPath;
    String toPath;
    String args0 = null;
    String key_store;
    RemoteRegistry remoteRegistry;

    if (args.length > 0) {
      args0 = args[0];
    }

    InputStreamReader is = new InputStreamReader(System.in);
    BufferedReader br = new BufferedReader(is);

    System.out.println("Path to registry key_store file:");
    key_store = br.readLine();

    System.out.println("Registry URL :");

    registryURL = br.readLine();

    System.out.println("User Name :");

    userName = br.readLine();

    if ("".equals(userName)) {
      userName = null;
    }
    System.out.println("Password :");
    passWord = br.readLine();

    if ("".equals(passWord)) {
      passWord = null;
    }

    System.out.println("From Path :");
    fromPath = br.readLine();
    if ("".equals(fromPath)) {
      throw new Exception(
          " From path can not be null , you have to provide the local file system location!!");
    }
    System.out.println("To Path :");
    toPath = br.readLine();

    System.setProperty("javax.net.ssl.trustStore", key_store);
    System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
    System.setProperty("javax.net.ssl.trustStoreType", "JKS");

    if (userName == null) {
      remoteRegistry = new RemoteRegistry(new URL(registryURL));
    } else {
      remoteRegistry = new RemoteRegistry(new URL(registryURL), userName,
          passWord);
    }

    if (args0 == null) {
View Full Code Here

TOP

Related Classes of org.wso2.carbon.registry.app.RemoteRegistry

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.