Package anvil.server

Examples of anvil.server.Configurable


 
 
  public void reconfigure(Zone zone)
  {
    Configurable[] configs = zone.getConfigurations();
    Configurable c;
    int n = configs.length;
    for(int i=0; i<n; i++) {
      c = configs[i];
      switch (c.getType()) {
      case Configurable.ZONE:
      case Configurable.DOMAIN:
      case Configurable.SERVER:
        reconfigure((Zone)c);
        break;
View Full Code Here


  /// @method getParent
  /// Returns the parent of this object.
  /// @synopsis Configurable getParent()
  public Any m_getParent()
  {
    Configurable parent = _conf.getParent();
    return (parent != null) ? new AnyConfigurable(parent) : UNDEFINED;
  }
View Full Code Here

  /// starting from this object.
  /// @synopsis Configurable find(int identity)
  public static final Object[] p_find = { "identity" };
  public Any m_find(int id)
  {
    Configurable cfg = find(_conf, id);
    return (cfg != null) ? new AnyConfigurable(cfg) : Any.UNDEFINED;
  }
View Full Code Here

  /// @throws AccessDenied if security policy denies this operation
  public static final Object[] p_create = { null, "type" };
  public Any m_create(Context context, String type)
  {
    context.checkAccess(CAN_WRITE);
    Configurable cfg = null;
    if (_conf instanceof Zone) {
      cfg = ConfigReader.create((Zone)_conf, type);
    }
    if (cfg != null) {
      _conf.configure(cfg);
View Full Code Here

  /// @synopsis boolean remove()
  /// @throws AccessDenied if security policy denies this operation
  public Any m_remove(Context context)
  {
    context.checkAccess(CAN_WRITE);
    Configurable parent = _conf.getParent();
    if (parent != null) {
      parent.deleteConfiguration(_conf);
      return TRUE;
    } else {
      return FALSE;
    }
  }
View Full Code Here

  /// @method isStarted
  /// Checks if this object is started.
  /// @synopsis boolean isStarted()
  public Any m_isStarted()
  {
    Configurable c = _conf;
    while(c != null) {
      if (c instanceof Zone) {
        return ((Zone)c).isStarted() ? TRUE : FALSE;
      }
      c = c.getParent();
    }
    return FALSE;
  }
View Full Code Here

TOP

Related Classes of anvil.server.Configurable

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.