private boolean canAddVelocimacro(String name,String sourceTemplate){
  if (getAutoload()) {
    for (int i=0; i < macroLibVec.size(); i++) {
      String lib=(String)macroLibVec.elementAt(i);
      if (lib.equals(sourceTemplate)) {
        return true;
      }
    }
  }
  if (!addNewAllowed) {
    logVMMessageWarn("Velocimacro : VM addition rejected : " + name + " : inline VMs not allowed.");
    return false;
  }
  if (!templateLocal) {
    if (isVelocimacro(name,sourceTemplate) && !replaceAllowed) {
      logVMMessageWarn("Velocimacro : VM addition rejected : " + name + " : inline not allowed to replace existing VM");
      return false;
    }
  }
  return true;
}

private boolean canAddVelocimacro ( String name , String sourceTemplate ) { if ( getAutoload ( ) ) { for ( int i = 0 ; i < macroLibVec . size ( ) ; i ++ ) { String lib = ( String ) macroLibVec . elementAt ( i ) ; if ( lib . equals ( sourceTemplate ) ) { return true ; } } } if ( ! addNewAllowed ) { logVMMessageWarn ( "Velocimacro : VM addition rejected : " + name + " : inline VMs not allowed." ) ; return false ; } if ( ! templateLocal ) { if ( isVelocimacro ( name , sourceTemplate ) && ! replaceAllowed ) { logVMMessageWarn ( "Velocimacro : VM addition rejected : " + name + " : inline not allowed to replace existing VM" ) ; return false ; } } return true ; }
determines if a given macro / namespace ( name , source ) combo is allowed to be added
