Package org.mule.registry

Examples of org.mule.registry.Library


    JbiDocument.Jbi jbi = ((JbiDocument.Jbi)getDescriptor().getConfiguration());
    // Check shared libraries
    com.sun.java.xml.ns.jbi.ComponentDocument.Component.SharedLibrary[] libs = jbi.getComponent().getSharedLibraryArray();
    for (int i = 0; i < libs.length; i++) {
      String libName = libs[i].getDomNode().getFirstChild().getNodeValue();
      Library library = getRegistry().getLibrary(libName);
      if (library == null) {
        throw new RegistryException("Component requires a missing shared library: " + libName);
      }
      library.addComponent(this);
    }

        // Get class path elements
    this.classPathElements = Arrays.asList(jbi.getComponent().getComponentClassPath().getPathElementArray());
    // Class loader delegation
View Full Code Here


    if (context.getRegistry().getLibrary(name) != null) {
      throw new JBIException("Shared library is already installed");
    }
    // Create library
    File installDir = Directories.getLibraryInstallDir(context.getWorkingDir(), name);
    Library lib = context.getRegistry().addLibrary(name);
    lib.setInstallRoot(installDir.getAbsolutePath());
    // Move unzipped files to install dir
    IOUtils.unzip(file, installDir);
    // Finish installation
    lib.install();
    return name;
  }
View Full Code Here

    return name;
  }

  public synchronized boolean uninstallSharedLibrary(String aSharedLibName) {
    try {
      Library lib = context.getRegistry().getLibrary(aSharedLibName);
      if (lib == null) {
        throw new JBIException("Library does not exists");
      }
      lib.uninstall();
      return true;
    } catch (Exception e) {
      LOGGER.error("Error uninstalling library", e);
      return false;
    }
View Full Code Here

        unit.setName(name);
        return unit;
    }

    public Library createLibrary(String name) {
        Library library = new JbiLibrary(this);
        library.setName(name);
        return library;
    }
View Full Code Here

TOP

Related Classes of org.mule.registry.Library

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.