Codota Logo
PackageState
Code IndexAdd Codota to your IDE (free)

How to use
PackageState
in
org.jfree.base.modules

Best Java code snippets using org.jfree.base.modules.PackageState (Showing top 20 results out of 315)

  • Common ways to obtain PackageState
private void myMethod () {
PackageState p =
  • Codota IconPackageManager packageManager;(PackageState) packageManager.modules.get(index)
  • Codota IconList list;(PackageState) list.get(location)
  • Codota IconModule module;new PackageState(module, state)
  • Smart code suggestions by Codota
}
origin: jfree/jcommon

/**
 * Adds a module to the package manager.
 * Once all modules are added, you have to call initializeModules()
 * to configure and initialize the new modules.
 *
 * @param modClass the module class
 */
public synchronized void addModule(final String modClass) {
  final ArrayList loadModules = new ArrayList();
  final ModuleInfo modInfo = new DefaultModuleInfo
    (modClass, null, null, null);
  if (loadModule(modInfo, new ArrayList(), loadModules, false)) {
    for (int i = 0; i < loadModules.size(); i++) {
      final Module mod = (Module) loadModules.get(i);
      this.modules.add(new PackageState(mod));
    }
  }
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns all active modules. This array does only contain modules
 * which were successfully configured and initialized.
 *
 * @return the list of all active modules.
 */
public Module[] getActiveModules() {
  final ArrayList mods = new ArrayList();
  for (int i = 0; i < this.modules.size(); i++) {
    final PackageState state = (PackageState) this.modules.get(i);
    if (state.getState() == PackageState.STATE_INITIALIZED) {
      mods.add(state.getModule());
    }
  }
  return (Module[]) mods.toArray(new Module[mods.size()]);
}
origin: jfree/jcommon

/**
 * Initializes all previously uninitialized modules. Once a module is initialized,
 * it is not re-initialized a second time.
 */
public synchronized void initializeModules() {
  // sort by subsystems and dependency
  PackageSorter.sort(this.modules);
  for (int i = 0; i < this.modules.size(); i++) {
    final PackageState mod = (PackageState) this.modules.get(i);
    if (mod.configure(this.booter)) {
      Log.debug(new Log.SimpleMessage("Conf: ",
        new PadMessage(mod.getModule().getModuleClass(), 70),
        " [", mod.getModule().getSubSystem(), "]"));
    }
  }
  for (int i = 0; i < this.modules.size(); i++) {
    final PackageState mod = (PackageState) this.modules.get(i);
    if (mod.initialize(this.booter)) {
      Log.debug(new Log.SimpleMessage("Init: ",
        new PadMessage(mod.getModule().getModuleClass(), 70),
        " [", mod.getModule().getSubSystem(), "]"));
    }
  }
}
origin: jfree/jcommon

/**
 * Returns an array of the currently active modules. The module definition
 * returned contain all known modules, including buggy and unconfigured
 * instances.
 *
 * @return the modules.
 */
public Module[] getAllModules() {
  final Module[] mods = new Module[this.modules.size()];
  for (int i = 0; i < this.modules.size(); i++) {
    final PackageState state = (PackageState) this.modules.get(i);
    mods[i] = state.getModule();
  }
  return mods;
}
origin: org.jfree/jcommon

/**
 * Initializes all previously uninitialized modules. Once a module is initialized,
 * it is not re-initialized a second time.
 */
public synchronized void initializeModules() {
  // sort by subsystems and dependency
  PackageSorter.sort(this.modules);
  for (int i = 0; i < this.modules.size(); i++) {
    final PackageState mod = (PackageState) this.modules.get(i);
    if (mod.configure(this.booter)) {
      Log.debug(new Log.SimpleMessage("Conf: ",
        new PadMessage(mod.getModule().getModuleClass(), 70),
        " [", mod.getModule().getSubSystem(), "]"));
    }
  }
  for (int i = 0; i < this.modules.size(); i++) {
    final PackageState mod = (PackageState) this.modules.get(i);
    if (mod.initialize(this.booter)) {
      Log.debug(new Log.SimpleMessage("Init: ",
        new PadMessage(mod.getModule().getModuleClass(), 70),
        " [", mod.getModule().getSubSystem(), "]"));
    }
  }
}
origin: org.jfree/jcommon

/**
 * Returns an array of the currently active modules. The module definition
 * returned contain all known modules, including buggy and unconfigured
 * instances.
 *
 * @return the modules.
 */
public Module[] getAllModules() {
  final Module[] mods = new Module[this.modules.size()];
  for (int i = 0; i < this.modules.size(); i++) {
    final PackageState state = (PackageState) this.modules.get(i);
    mods[i] = state.getModule();
  }
  return mods;
}
origin: jfree/jcommon

/**
 * Returns all active modules. This array does only contain modules
 * which were successfully configured and initialized.
 *
 * @return the list of all active modules.
 */
public Module[] getActiveModules() {
  final ArrayList mods = new ArrayList();
  for (int i = 0; i < this.modules.size(); i++) {
    final PackageState state = (PackageState) this.modules.get(i);
    if (state.getState() == PackageState.STATE_INITIALIZED) {
      mods.add(state.getModule());
    }
  }
  return (Module[]) mods.toArray(new Module[mods.size()]);
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Initializes all previously uninitialized modules. Once a module is initialized,
 * it is not re-initialized a second time.
 */
public synchronized void initializeModules() {
  // sort by subsystems and dependency
  PackageSorter.sort(this.modules);
  for (int i = 0; i < this.modules.size(); i++) {
    final PackageState mod = (PackageState) this.modules.get(i);
    if (mod.configure(this.booter)) {
      Log.debug(new Log.SimpleMessage("Conf: ",
        new PadMessage(mod.getModule().getModuleClass(), 70),
        " [", mod.getModule().getSubSystem(), "]"));
    }
  }
  for (int i = 0; i < this.modules.size(); i++) {
    final PackageState mod = (PackageState) this.modules.get(i);
    if (mod.initialize(this.booter)) {
      Log.debug(new Log.SimpleMessage("Init: ",
        new PadMessage(mod.getModule().getModuleClass(), 70),
        " [", mod.getModule().getSubSystem(), "]"));
    }
  }
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns an array of the currently active modules. The module definition
 * returned contain all known modules, including buggy and unconfigured
 * instances.
 *
 * @return the modules.
 */
public Module[] getAllModules() {
  final Module[] mods = new Module[this.modules.size()];
  for (int i = 0; i < this.modules.size(); i++) {
    final PackageState state = (PackageState) this.modules.get(i);
    mods[i] = state.getModule();
  }
  return mods;
}
origin: org.jfree/jcommon

/**
 * Adds a module to the package manager.
 * Once all modules are added, you have to call initializeModules()
 * to configure and initialize the new modules.
 *
 * @param modClass the module class
 */
public synchronized void addModule(final String modClass) {
  final ArrayList loadModules = new ArrayList();
  final ModuleInfo modInfo = new DefaultModuleInfo
    (modClass, null, null, null);
  if (loadModule(modInfo, new ArrayList(), loadModules, false)) {
    for (int i = 0; i < loadModules.size(); i++) {
      final Module mod = (Module) loadModules.get(i);
      this.modules.add(new PackageState(mod));
    }
  }
}
origin: org.jfree/jcommon

/**
 * Returns all active modules. This array does only contain modules
 * which were successfully configured and initialized.
 *
 * @return the list of all active modules.
 */
public Module[] getActiveModules() {
  final ArrayList mods = new ArrayList();
  for (int i = 0; i < this.modules.size(); i++) {
    final PackageState state = (PackageState) this.modules.get(i);
    if (state.getState() == PackageState.STATE_INITIALIZED) {
      mods.add(state.getModule());
    }
  }
  return (Module[]) mods.toArray(new Module[mods.size()]);
}
origin: jfree/jcommon

/**
 * Returns a basic string representation of this SortModule. This
 * should be used for debugging purposes only.
 * @see java.lang.Object#toString()
 *
 * @return a string representation of this module.
 */
public String toString ()
{
 final StringBuffer buffer = new StringBuffer();
 buffer.append("SortModule: ");
 buffer.append(this.position);
 buffer.append(" ");
 buffer.append(this.state.getModule().getName());
 buffer.append(" ");
 buffer.append(this.state.getModule().getModuleClass());
 return buffer.toString();
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Adds a module to the package manager.
 * Once all modules are added, you have to call initializeModules()
 * to configure and initialize the new modules.
 *
 * @param modClass the module class
 */
public synchronized void addModule(final String modClass) {
  final ArrayList loadModules = new ArrayList();
  final ModuleInfo modInfo = new DefaultModuleInfo
    (modClass, null, null, null);
  if (loadModule(modInfo, new ArrayList(), loadModules, false)) {
    for (int i = 0; i < loadModules.size(); i++) {
      final Module mod = (Module) loadModules.get(i);
      this.modules.add(new PackageState(mod));
    }
  }
}
origin: jfree/jcommon

/**
 * Checks, whether a certain module is available.
 *
 * @param moduleDescription the module description of the desired module.
 * @return true, if the module is available and the version of the module
 *         is compatible, false otherwise.
 */
public boolean isModuleAvailable(final ModuleInfo moduleDescription) {
  final PackageState[] packageStates =
    (PackageState[]) this.modules.toArray(new PackageState[this.modules.size()]);
  for (int i = 0; i < packageStates.length; i++) {
    final PackageState state = packageStates[i];
    if (state.getModule().getModuleClass().equals(moduleDescription.getModuleClass())) {
      return (state.getState() == PackageState.STATE_INITIALIZED);
    }
  }
  return false;
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns a basic string representation of this SortModule. This
 * should be used for debugging purposes only.
 * @see java.lang.Object#toString()
 *
 * @return a string representation of this module.
 */
public String toString ()
{
 final StringBuffer buffer = new StringBuffer();
 buffer.append("SortModule: ");
 buffer.append(this.position);
 buffer.append(" ");
 buffer.append(this.state.getModule().getName());
 buffer.append(" ");
 buffer.append(this.state.getModule().getModuleClass());
 return buffer.toString();
}
origin: jfree/jcommon

final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
dropFailedModule(state);
return false;
final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
dropFailedModule(state);
return false;
    ("Circular module reference: This module definition is invalid: ",
      module.getClass()));
  final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
  dropFailedModule(state);
  return false;
  if (loadModule(required[i], incompleteModules, modules, true) == false) {
    Log.debug("Indicated failure for module: " + module.getModuleClass());
    final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
    dropFailedModule(state);
    return false;
origin: org.jfree/jcommon

/**
 * Checks, whether a certain module is available.
 *
 * @param moduleDescription the module description of the desired module.
 * @return true, if the module is available and the version of the module
 *         is compatible, false otherwise.
 */
public boolean isModuleAvailable(final ModuleInfo moduleDescription) {
  final PackageState[] packageStates =
    (PackageState[]) this.modules.toArray(new PackageState[this.modules.size()]);
  for (int i = 0; i < packageStates.length; i++) {
    final PackageState state = packageStates[i];
    if (state.getModule().getModuleClass().equals(moduleDescription.getModuleClass())) {
      return (state.getState() == PackageState.STATE_INITIALIZED);
    }
  }
  return false;
}
origin: org.jfree/jcommon

/**
 * Returns a basic string representation of this SortModule. This
 * should be used for debugging purposes only.
 * @see java.lang.Object#toString()
 *
 * @return a string representation of this module.
 */
public String toString ()
{
 final StringBuffer buffer = new StringBuffer();
 buffer.append("SortModule: ");
 buffer.append(this.position);
 buffer.append(" ");
 buffer.append(this.state.getModule().getName());
 buffer.append(" ");
 buffer.append(this.state.getModule().getModuleClass());
 return buffer.toString();
}
origin: org.jfree/com.springsource.org.jfree

final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
dropFailedModule(state);
return false;
final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
dropFailedModule(state);
return false;
    ("Circular module reference: This module definition is invalid: ",
      module.getClass()));
  final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
  dropFailedModule(state);
  return false;
  if (loadModule(required[i], incompleteModules, modules, true) == false) {
    Log.debug("Indicated failure for module: " + module.getModuleClass());
    final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
    dropFailedModule(state);
    return false;
origin: org.jfree/com.springsource.org.jfree

/**
 * Checks, whether a certain module is available.
 *
 * @param moduleDescription the module description of the desired module.
 * @return true, if the module is available and the version of the module
 *         is compatible, false otherwise.
 */
public boolean isModuleAvailable(final ModuleInfo moduleDescription) {
  final PackageState[] packageStates =
    (PackageState[]) this.modules.toArray(new PackageState[this.modules.size()]);
  for (int i = 0; i < packageStates.length; i++) {
    final PackageState state = packageStates[i];
    if (state.getModule().getModuleClass().equals(moduleDescription.getModuleClass())) {
      return (state.getState() == PackageState.STATE_INITIALIZED);
    }
  }
  return false;
}
org.jfree.base.modulesPackageState

Javadoc

The package state class is used by the package manager to keep track of the activation level of the installed or errornous packages.

Most used methods

  • <init>
    Creates a new package state for the given module. The module state will be initialized to the given
  • configure
    Configures the module and raises the state to STATE_CONFIGURED if the module is not yet configured.
  • getModule
    Returns the module managed by this state implementation.
  • getState
    Returns the current state of the module. This method returns either STATE_NEW, STATE_CONFIGURED, STA
  • initialize
    Initializes the contained module and raises the set of the module to STATE_INITIALIZED, if the modul

Popular in Java

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now