org.apache.axis2.util.Utils.getModuleName()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(176)

本文整理了Java中org.apache.axis2.util.Utils.getModuleName()方法的一些代码示例,展示了Utils.getModuleName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getModuleName()方法的具体详情如下:
包路径:org.apache.axis2.util.Utils
类名称:Utils
方法名:getModuleName

Utils.getModuleName介绍

暂无

代码示例

代码示例来源:origin: apache/axis2-java

/**
 * Remove a module with moduleName & moduleVersion
 *
 * @param moduleName the name of the module to remove
 * @param moduleVersion the version of the module to remove
 */
public void removeModule(String moduleName, String moduleVersion) {
  allModules.remove(Utils.getModuleName(moduleName, moduleVersion));
  // TODO disengage has to be done here
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

/**
 * Remove a module with moduleName & moduleVersion
 *
 * @param moduleName the name of the module to remove
 * @param moduleVersion the version of the module to remove
 */
public void removeModule(String moduleName, String moduleVersion) {
  allModules.remove(Utils.getModuleName(moduleName, moduleVersion));
  // TODO disengage has to be done here
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

/**
 * Return the module having name=moduleName & version=moduleVersion
 *
 * @param moduleName    The module name
 * @param moduleVersion The version of the module
 * @return The AxisModule having name=moduleName & version=moduleVersion
 */
public AxisModule getModule(String moduleName, String moduleVersion) {
  if (moduleVersion == null || moduleVersion.trim().length() == 0) {
    moduleVersion = getDefaultModuleVersion(moduleName);
  }
  return allModules.get(Utils.getModuleName(moduleName, moduleVersion));
}

代码示例来源:origin: apache/axis2-java

/**
 * Return the module having name=moduleName & version=moduleVersion
 *
 * @param moduleName    The module name
 * @param moduleVersion The version of the module
 * @return The AxisModule having name=moduleName & version=moduleVersion
 */
public AxisModule getModule(String moduleName, String moduleVersion) {
  if (moduleVersion == null || moduleVersion.trim().length() == 0) {
    moduleVersion = getDefaultModuleVersion(moduleName);
  }
  return allModules.get(Utils.getModuleName(moduleName, moduleVersion));
}

代码示例来源:origin: org.wso2.wsas/wso2wsas-admin

private AxisModule getAxisModule(String moduleId,
                 String moduleVersion) throws AxisFault {
  AxisModule module = getAxisConfig().getModule(moduleId, moduleVersion);
  if (module == null) {
    throw new AxisFault("Invalid module name : " +
              Utils.getModuleName(moduleId, moduleVersion));
  }
  return module;
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

/**
 * Get an AxisModule by name.
 *
 * If the exact name passed (which might contain a version) is present, we'll return that,
 * otherwise we'll look for the default version *if* there is no version in the passed
 * name.
 *
 * @param name module name to look up
 * @return an AxisModule if found, or null
 */
public AxisModule getModule(String name) {
  AxisModule module = allModules.get(name);
  if (module != null) {
    return module;
  }
  // checks whether the version string seperator is not there in the
  // module name
  String defaultModuleVersion = getDefaultModuleVersion(name);
  if (defaultModuleVersion != null) {
    module = allModules.get(Utils.getModuleName(name, defaultModuleVersion));
    if (module != null) {
      return module;
    }
  }
  return null;
}

代码示例来源:origin: apache/axis2-java

/**
 * Get an AxisModule by name.
 *
 * If the exact name passed (which might contain a version) is present, we'll return that,
 * otherwise we'll look for the default version *if* there is no version in the passed
 * name.
 *
 * @param name module name to look up
 * @return an AxisModule if found, or null
 */
public AxisModule getModule(String name) {
  AxisModule module = allModules.get(name);
  if (module != null) {
    return module;
  }
  // checks whether the version string seperator is not there in the
  // module name
  String defaultModuleVersion = getDefaultModuleVersion(name);
  if (defaultModuleVersion != null) {
    module = allModules.get(Utils.getModuleName(name, defaultModuleVersion));
    if (module != null) {
      return module;
    }
  }
  return null;
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

/**
 * Engages a module using given name and its version ID.
 *
 * @param moduleName name of module to engage
 * @param versionID version of module to engage
 * @throws AxisFault
 */
public void engageModule(String moduleName, String versionID)
    throws AxisFault {
  String actualName = Utils.getModuleName(moduleName, versionID);
  AxisModule module = getModule(actualName);
  if (module != null) {
    engageModule(module);
  } else {
    // TODO : Should this be an NPE or InvalidArgumentException?
    throw new AxisFault(Messages.getMessage("refertoinvalidmodule"));
  }
}

代码示例来源:origin: apache/axis2-java

/**
 * Engages a module using given name and its version ID.
 *
 * @param moduleName name of module to engage
 * @param versionID version of module to engage
 * @throws AxisFault
 */
public void engageModule(String moduleName, String versionID)
    throws AxisFault {
  String actualName = Utils.getModuleName(moduleName, versionID);
  AxisModule module = getModule(actualName);
  if (module != null) {
    engageModule(module);
  } else {
    // TODO : Should this be an NPE or InvalidArgumentException?
    throw new AxisFault(Messages.getMessage("refertoinvalidmodule"));
  }
}

代码示例来源:origin: org.wso2.wsas/wso2wsas-admin

String moduleName = Utils.getModuleName(moduleId, moduleVersion);
AxisModule axisModule = axisConfig.getModule(moduleName);
  return Utils.getModuleName(moduleId, moduleVersion) + " module is already engaged globally.";
  axisConfig.engageModule(axisModule);
} catch (AxisFault axisFault) {
  log.error("Error occurred while " + Utils.getModuleName(moduleId, moduleVersion) +
       " module was trying to be engaged to the service", axisFault);
      Utils.getModuleName(moduleId, moduleVersion) + " module.\n" +
      "This may be due to either the module being faulty, or the system, service(s) or" +
      " operations(s) already being engaged to a different version of the " +
  log.warn("Module " + Utils.getModuleName(moduleId, moduleVersion) +
       " not found in database");
return Utils.getModuleName(moduleId, moduleVersion) + " was successfully engaged globally.";

代码示例来源:origin: org.wso2.wsas/wso2wsas-admin

if (WsasUtils.isURL(axis2Repo)) {
  throw new AxisFault("You are not permitted to remove the " +
            Utils.getModuleName(moduleId, moduleVersion) +
            " module from the URL repository " + axis2Repo);
if (moduleDO != null) {
  if (!moduleDO.getSecurityScenarios().isEmpty()) {
    throw new AxisFault("The " + Utils.getModuleName(moduleId, moduleVersion) +
              " module cannot be removed since it is " +
              "associated with at least one security scenario." +

代码示例来源:origin: org.wso2.wsas/wso2wsas-admin

return Utils.getModuleName(moduleId, moduleVersion) +
    " module is globally engaged. You need not engage it to this service.";
return Utils.getModuleName(moduleId, moduleVersion) +
    " module is already engaged to the " + serviceId + " service";
return Utils.getModuleName(moduleId, moduleVersion) +
    " module was successfully engaged to service " +
    serviceId + (serviceVersion != null ? serviceVersion : "");

代码示例来源:origin: org.wso2.wsas/wso2wsas-admin

return Utils.getModuleName(moduleId, moduleVersion) +
      " module is globally engaged. You need not engage it to this operation.";
  return Utils.getModuleName(moduleId, moduleVersion) +
      " module is engaged to service group " + axisServiceGroup.getServiceGroupName() +
      ". You need not engage it to this operation.";
  return Utils.getModuleName(moduleId, moduleVersion) +
      " module is engaged to service " + serviceId +
      ". You need not engage it to this operation.";
  return Utils.getModuleName(moduleId, moduleVersion) +
      " module is already engaged to operation " + operationId;
                        axisOp.getName().getLocalPart()));
return Utils.getModuleName(moduleId, moduleVersion) +
    " module has been successfully engaged to operation " + operationId;

代码示例来源:origin: org.wso2.wsas/wso2wsas-admin

return "Module " + Utils.getModuleName(moduleId, moduleVersion) +
      " has already been engaged to service group " + serviceGroupId;
                 moduleVersion,
                 pm.getServiceGroup(serviceGroupId));
return "Module " + Utils.getModuleName(moduleId, moduleVersion) +
    " successfully engaged to service group " + serviceGroupId;

相关文章