public void initVelocimacro(){
synchronized (this) {
    setReplacementPermission(true);
    setBlather(true);
    logVMMessageInfo("Velocimacro : initialization starting.");
    vmManager.setNamespaceUsage(false);
    Object libfiles=rsvc.getProperty(RuntimeConstants.VM_LIBRARY);
    if (libfiles != null) {
      if (libfiles instanceof Vector) {
        macroLibVec=(Vector)libfiles;
      }
 else       if (libfiles instanceof String) {
        macroLibVec=new Vector();
        macroLibVec.addElement(libfiles);
      }
      for (int i=0; i < macroLibVec.size(); i++) {
        String lib=(String)macroLibVec.elementAt(i);
        if (lib != null && !lib.equals("")) {
          vmManager.setRegisterFromLib(true);
          logVMMessageInfo("Velocimacro : adding VMs from " + "VM library template : " + lib);
          try {
            Template template=rsvc.getTemplate(lib);
            Twonk twonk=new Twonk();
            twonk.template=template;
            twonk.modificationTime=template.getLastModified();
            libModMap.put(lib,twonk);
          }
 catch (          Exception e) {
            logVMMessageInfo("Velocimacro : error using  VM " + "library template " + lib + " : "+ e);
          }
          logVMMessageInfo("Velocimacro :  VM library template " + "macro registration complete.");
          vmManager.setRegisterFromLib(false);
        }
      }
    }
    setAddMacroPermission(true);
    if (!rsvc.getBoolean(RuntimeConstants.VM_PERM_ALLOW_INLINE,true)) {
      setAddMacroPermission(false);
      logVMMessageInfo("Velocimacro : allowInline = false : VMs can not " + "be defined inline in templates");
    }
 else {
      logVMMessageInfo("Velocimacro : allowInline = true : VMs can be " + "defined inline in templates");
    }
    setReplacementPermission(false);
    if (rsvc.getBoolean(RuntimeConstants.VM_PERM_ALLOW_INLINE_REPLACE_GLOBAL,false)) {
      setReplacementPermission(true);
      logVMMessageInfo("Velocimacro : allowInlineToOverride = true : VMs " + "defined inline may replace previous VM definitions");
    }
 else {
      logVMMessageInfo("Velocimacro : allowInlineToOverride = false : VMs " + "defined inline may NOT replace previous VM definitions");
    }
    vmManager.setNamespaceUsage(true);
    setTemplateLocalInline(rsvc.getBoolean(RuntimeConstants.VM_PERM_INLINE_LOCAL,false));
    if (getTemplateLocalInline()) {
      logVMMessageInfo("Velocimacro : allowInlineLocal = true : VMs " + "defined inline will be local to their defining template only.");
    }
 else {
      logVMMessageInfo("Velocimacro : allowInlineLocal = false : VMs " + "defined inline will be  global in scope if allowed.");
    }
    vmManager.setTemplateLocalInlineVM(getTemplateLocalInline());
    setBlather(rsvc.getBoolean(RuntimeConstants.VM_MESSAGES_ON,true));
    if (getBlather()) {
      logVMMessageInfo("Velocimacro : messages on  : VM system " + "will output logging messages");
    }
 else {
      logVMMessageInfo("Velocimacro : messages off : VM system will be quiet");
    }
    setAutoload(rsvc.getBoolean(RuntimeConstants.VM_LIBRARY_AUTORELOAD,false));
    if (getAutoload()) {
      logVMMessageInfo("Velocimacro : autoload on  : VM system " + "will automatically reload global library macros");
    }
 else {
      logVMMessageInfo("Velocimacro : autoload off  : VM system " + "will not automatically reload global library macros");
    }
    rsvc.info("Velocimacro : initialization complete.");
  }
  return;
}

public void initVelocimacro ( ) { synchronized ( this ) { setReplacementPermission ( true ) ; setBlather ( true ) ; logVMMessageInfo ( "Velocimacro : initialization starting." ) ; vmManager . setNamespaceUsage ( false ) ; Object libfiles = rsvc . getProperty ( RuntimeConstants . VM_LIBRARY ) ; if ( libfiles != null ) { if ( libfiles instanceof Vector ) { macroLibVec = ( Vector ) libfiles ; } else if ( libfiles instanceof String ) { macroLibVec = new Vector ( ) ; macroLibVec . addElement ( libfiles ) ; } for ( int i = 0 ; i < macroLibVec . size ( ) ; i ++ ) { String lib = ( String ) macroLibVec . elementAt ( i ) ; if ( lib != null && ! lib . equals ( "" ) ) { vmManager . setRegisterFromLib ( true ) ; logVMMessageInfo ( "Velocimacro : adding VMs from " + "VM library template : " + lib ) ; try { Template template = rsvc . getTemplate ( lib ) ; Twonk twonk = new Twonk ( ) ; twonk . template = template ; twonk . modificationTime = template . getLastModified ( ) ; libModMap . put ( lib , twonk ) ; } catch ( Exception e ) { logVMMessageInfo ( "Velocimacro : error using  VM " + "library template " + lib + " : " + e ) ; } logVMMessageInfo ( "Velocimacro :  VM library template " + "macro registration complete." ) ; vmManager . setRegisterFromLib ( false ) ; } } } setAddMacroPermission ( true ) ; if ( ! rsvc . getBoolean ( RuntimeConstants . VM_PERM_ALLOW_INLINE , true ) ) { setAddMacroPermission ( false ) ; logVMMessageInfo ( "Velocimacro : allowInline = false : VMs can not " + "be defined inline in templates" ) ; } else { logVMMessageInfo ( "Velocimacro : allowInline = true : VMs can be " + "defined inline in templates" ) ; } setReplacementPermission ( false ) ; if ( rsvc . getBoolean ( RuntimeConstants . VM_PERM_ALLOW_INLINE_REPLACE_GLOBAL , false ) ) { setReplacementPermission ( true ) ; logVMMessageInfo ( "Velocimacro : allowInlineToOverride = true : VMs " + "defined inline may replace previous VM definitions" ) ; } else { logVMMessageInfo ( "Velocimacro : allowInlineToOverride = false : VMs " + "defined inline may NOT replace previous VM definitions" ) ; } vmManager . setNamespaceUsage ( true ) ; setTemplateLocalInline ( rsvc . getBoolean ( RuntimeConstants . VM_PERM_INLINE_LOCAL , false ) ) ; if ( getTemplateLocalInline ( ) ) { logVMMessageInfo ( "Velocimacro : allowInlineLocal = true : VMs " + "defined inline will be local to their defining template only." ) ; } else { logVMMessageInfo ( "Velocimacro : allowInlineLocal = false : VMs " + "defined inline will be  global in scope if allowed." ) ; } vmManager . setTemplateLocalInlineVM ( getTemplateLocalInline ( ) ) ; setBlather ( rsvc . getBoolean ( RuntimeConstants . VM_MESSAGES_ON , true ) ) ; if ( getBlather ( ) ) { logVMMessageInfo ( "Velocimacro : messages on  : VM system " + "will output logging messages" ) ; } else { logVMMessageInfo ( "Velocimacro : messages off : VM system will be quiet" ) ; } setAutoload ( rsvc . getBoolean ( RuntimeConstants . VM_LIBRARY_AUTORELOAD , false ) ) ; if ( getAutoload ( ) ) { logVMMessageInfo ( "Velocimacro : autoload on  : VM system " + "will automatically reload global library macros" ) ; } else { logVMMessageInfo ( "Velocimacro : autoload off  : VM system " + "will not automatically reload global library macros" ) ; } rsvc . info ( "Velocimacro : initialization complete." ) ; } return ; }
initialize the factory - setup all permissions load all global libraries .
