org.wso2.carbon.utils.Utils.getRuntimePath()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(99)

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

Utils.getRuntimePath介绍

[英]Returns the Runtime Home directory path. If wso2.runtime.path system property is not found, gets the RUNTIME_PATH_ENV system property value and sets to the runtime home.
[中]返回运行时主目录路径。如果是wso2。运行时。找不到路径系统属性,获取运行时路径环境系统属性值并设置为运行时主目录。

代码示例

代码示例来源:origin: org.wso2.carbon.lcm/org.wso2.carbon.lcm.core

/**
 * This method will return the lifecycle schema location in the server directory.
 * @return schema location.
 */
private static String getLifecycleSchemaLocation() {
  return Utils.getRuntimePath() + File.separator + "resources" + File.separator + "lifecycle-config.xsd";
}

代码示例来源:origin: org.wso2.carbon.lcm/org.wso2.carbon.lcm.core

private static String getDefaltLifecycleConfigLocation() {
    return Utils.getRuntimePath() + File.separator + "resources" + File.separator + "lifecycles";
  }
}

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.event.simulator.core

/**
 * This is the activation method of ServiceComponent. This will be called when it's references are fulfilled
 *
 * @throws Exception this will be thrown if an issue occurs while executing the activate method
 */
@Activate
protected void start() throws Exception {
  //set maximum csv file size to 8MB
  EventSimulatorDataHolder.getInstance().setMaximumFileSize(8388608);
  EventSimulatorDataHolder.getInstance().setCsvFileDirectory(Paths.get(Utils.getRuntimePath().toString(),
      EventSimulatorConstants.DIRECTORY_DEPLOYMENT, EventSimulatorConstants.DIRECTORY_CSV_FILES).toString());
  if (log.isDebugEnabled()) {
    log.debug("Event Simulator file service component is activated");
  }
}

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.event.simulator.core

getConfigUploader().
getSimulationConfig(simulationName,
          (Paths.get(Utils.getRuntimePath().toString(),
               EventSimulatorConstants.DIRECTORY_DEPLOYMENT,
               EventSimulatorConstants.DIRECTORY_SIMULATION_CONFIGS))

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.event.simulator.core

getConfigUploader().
deleteSimulationConfig(simulationName,
            (Paths.get(Utils.getRuntimePath().toString(),
                 EventSimulatorConstants.DIRECTORY_DEPLOYMENT,
                 EventSimulatorConstants.DIRECTORY_SIMULATION_CONFIGS))

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.event.simulator.core

if (simulationConfigUploader.checkSimulationExists(
    simulationName,
    Paths.get(Utils.getRuntimePath().toString(),
         EventSimulatorConstants.DIRECTORY_DEPLOYMENT,
         EventSimulatorConstants.DIRECTORY_SIMULATION_CONFIGS).toString())) {
    deleted = simulationConfigUploader.
        deleteSimulationConfig(simulationName,
                    (Paths.get(Utils.getRuntimePath().toString(),
                         EventSimulatorConstants.DIRECTORY_DEPLOYMENT,
                         EventSimulatorConstants.DIRECTORY_SIMULATION_CONFIGS))
          uploadSimulationConfig(
              simulationConfigDetails,
              (Paths.get(Utils.getRuntimePath().toString(),
                    EventSimulatorConstants.DIRECTORY_DEPLOYMENT,
                    EventSimulatorConstants.DIRECTORY_SIMULATION_CONFIGS)).toString());

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.event.simulator.core

getConfigUploader().
    getSimulationConfig(entry.getKey(),
              (Paths.get(Utils.getRuntimePath().toString(),
                    EventSimulatorConstants.DIRECTORY_DEPLOYMENT,
                    EventSimulatorConstants.DIRECTORY_SIMULATION_CONFIGS)).
JSONObject inactiveSimulation = new JSONObject(SimulationConfigUploader.getConfigUploader()
                            .getSimulationConfig(entry.getKey(), (Paths.get(
                                Utils.getRuntimePath().toString(),
                                EventSimulatorConstants
                                    .DIRECTORY_DEPLOYMENT,

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.event.simulator.core

(Paths.get(Utils.getRuntimePath().toString(),
      EventSimulatorConstants.DIRECTORY_DEPLOYMENT,
      EventSimulatorConstants

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.stream.processor.core

private static String getFilePathFromFilename(String fileName) throws SiddhiAppDeploymentException {
    ConfigProvider configProvider = StreamProcessorDataHolder.getInstance().getConfigProvider();
    if (directoryPath == null && configProvider != null) {
      try {
        LinkedHashMap wso2ArtifactDeploymentMap = (LinkedHashMap) configProvider.
            getConfigurationObject(SiddhiAppProcessorConstants.WSO2_ARTIFACT_DEPLOYMENT_NS);
        if (wso2ArtifactDeploymentMap != null) {
          Object directoryPathObject = wso2ArtifactDeploymentMap.get(SiddhiAppProcessorConstants.
              WSO2_ARTIFACT_DEPLOYMENT_REPOSITORY_LOCATION);
          if (directoryPathObject != null) {
            directoryPath = directoryPathObject.toString();
          }
        }

      } catch (ConfigurationException e) {
        throw new SiddhiAppDeploymentException("Exception occurred when deriving the WSO2 deployment " +
            "directory folder path", e);
      }
    }

    if (directoryPath == null) {
      directoryPath = Utils.getRuntimePath() + File.separator + SiddhiAppProcessorConstants.
          SIDDHI_APP_DEPLOYMENT_DIRECTORY + File.separator +
          SiddhiAppProcessorConstants.SIDDHI_APP_FILES_DIRECTORY;
    }

    return directoryPath + File.separator + fileName + SiddhiAppProcessorConstants.SIDDHI_APP_FILE_EXTENSION;
  }
}

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.event.simulator.core

try {
  String simulationConfig = SimulationConfigUploader.getConfigUploader().getSimulationConfig
      (simulationName, (Paths.get(Utils.getRuntimePath().toString(),
          EventSimulatorConstants.DIRECTORY_DEPLOYMENT,
          EventSimulatorConstants.DIRECTORY_SIMULATION_CONFIGS)).toString());

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.event.simulator.core

try {
  String simulationConfig = SimulationConfigUploader.getConfigUploader().getSimulationConfig
      (simulationName, (Paths.get(Utils.getRuntimePath().toString(),
          EventSimulatorConstants.DIRECTORY_DEPLOYMENT,
          EventSimulatorConstants.DIRECTORY_SIMULATION_CONFIGS)).toString());

代码示例来源:origin: org.wso2.carbon.dashboards/org.wso2.carbon.dashboards.core

public void importDashboards() {
  Path path = Utils.getRuntimePath().resolve(Paths.get("resources", "dashboards"));
  Map<String, DashboardArtifact> dashboardArtifacts;
  try {

相关文章

微信公众号

最新文章

更多