当前位置: 首页>>代码示例>>Java>>正文


Java GenericService类代码示例

本文整理汇总了Java中atg.nucleus.GenericService的典型用法代码示例。如果您正苦于以下问题:Java GenericService类的具体用法?Java GenericService怎么用?Java GenericService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GenericService类属于atg.nucleus包,在下文中一共展示了GenericService类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: overrideLogListeners

import atg.nucleus.GenericService; //导入依赖的package包/类
public static void overrideLogListeners(GenericService service, List<String> listenerPaths) {
  if (listenerPaths == null || listenerPaths.isEmpty()) {
    if (service.isLoggingWarning()) {
      service.logWarning("Can not override log listeners as no override value has been set");
    }
    return;
  }
  
  if (service.isLoggingInfo()) {
    service.logInfo("Overriding logging queue");
  }
  
  LogListener [] currentListeners = service.getLogListeners();
  if (currentListeners != null) {
    for (int i = currentListeners.length - 1; i >= 0; i--) {
      service.removeLogListener(currentListeners[i]);
    }
    if (service.isLoggingInfo()) {
      service.logInfo("Log listeners have been overriden");
    }
  }
  
  for (String path: listenerPaths) {
      LogListener l = (LogListener)Nucleus.getGlobalNucleus().resolveName(path);
      if (l != null) {
        service.addLogListener(l);
      } else {
        if (service.isLoggingError()) {
          service.vlogError("Could not resolve service with path {}", path);
        }
      }
      
  }
}
 
开发者ID:vrakoton,项目名称:ATG11Extensions,代码行数:35,代码来源:LogListenerQueueUtil.java

示例2: setLoggingManager

import atg.nucleus.GenericService; //导入依赖的package包/类
public void setLoggingManager(GenericService pLogger) {
    mLogger = pLogger;
}
 
开发者ID:jvz,项目名称:dynunit,代码行数:4,代码来源:SQLProcessor.java

示例3: getLoggingManager

import atg.nucleus.GenericService; //导入依赖的package包/类
public GenericService getLoggingManager() {
    return mLogger;
}
 
开发者ID:jvz,项目名称:dynunit,代码行数:4,代码来源:SQLProcessor.java

示例4: setAbsoluteName

import atg.nucleus.GenericService; //导入依赖的package包/类
/**
 * Allows the absoluteName of the given service to be explicitly defined.
 * Normally this is determined by the object's location in the Nucleus
 * hierarchy.  For test items that are not really bound to Nucleus, it's
 * convenient to just give it an absolute name rather than going through
 * the whole configuration and binding process.
 *
 * @param absoluteName
 *         The absolute name value to set
 * @param service
 *         The service whose absolute name should be set.
 */
public static void setAbsoluteName(String absoluteName, GenericService service)
        throws IllegalAccessException {
    FieldUtils.writeDeclaredField(service, "mAbsoluteName", absoluteName, true);
}
 
开发者ID:jvz,项目名称:dynunit,代码行数:17,代码来源:NucleusUtils.java


注:本文中的atg.nucleus.GenericService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。