Tabnine Logo
DefaultServiceDescription
Code IndexAdd Tabnine to your IDE (free)

How to use
DefaultServiceDescription
in
com.logicbus.models.servant

Best Java code snippets using com.logicbus.models.servant.DefaultServiceDescription (Showing top 9 results out of 315)

origin: anylogic/alogic

  private void serviceFound(Element element,ServantCatalogNodeImpl node, String src,Class<?> bootstrap) {
    //从xml文件名中获取服务id
    int end = src.lastIndexOf('.');
    int start = src.lastIndexOf('/');
    String id = src.substring(start + 1, end);
    
    Path childPath = node.getPath().append(id);
    DefaultServiceDescription sd = new DefaultServiceDescription(childPath.getId());
    sd.setModule(servant);
    sd.setName(id);
    sd.setNote(id);
    sd.setPath(childPath.getPath());
    String visible = element.getAttribute("visible");
    sd.setVisible(StringUtils.isNotEmpty(visible)?visible:"public");
    String log = element.getAttribute("log");
    sd.setLogType(StringUtils.isNotEmpty(log)?log:"brief");
    sd.getProperties().SetValue("script", src);
    sd.getProperties().SetValue("bootstrap", bootstrap.getName());
    node.addService(sd.getServiceID(), sd);
  }
}
origin: anylogic/alogic

protected ServiceDescription toServiceDescription(Path _path,Element root){
  String id = root.getAttribute("id");
  if (id == null){
    return null;
  }
  
  Path childPath = _path.append(id);
  
  DefaultServiceDescription sd = new DefaultServiceDescription(childPath.getId());
  sd.fromXML(root);
  
  //保存module
  String module = sd.getModule();
  Properties p = sd.getProperties();
  p.SetValue("servant.impl", module);
  sd.setModule(servant);
  sd.setPath(childPath.getPath());		
  return sd;
}
origin: anylogic/alogic

/**
 * 从XML节点中提取服务描述信息
 * @param _path 父节点路径
 * @param root XML节点
 * @return 服务描述信息
 */
protected ServiceDescription toServiceDescription(Path _path,Element root){
  String id = root.getAttribute("id");
  if (id == null){
    return null;
  }
  
  Path childPath = _path.append(id);
  
  DefaultServiceDescription sd = new DefaultServiceDescription(childPath.getId());
  sd.fromXML(root);
  sd.setPath(childPath.getPath());
  
  return sd;
}

origin: anylogic/alogic

setServiceID(JsonTools.getString(json, "id", ""));
setName(JsonTools.getString(json, "name", getName()));
setModule(JsonTools.getString(json, "module", getModule()));
setNote(JsonTools.getString(json, "note", getNote()));
setVisible(JsonTools.getString(json, "visible", getVisible()));
setPath(JsonTools.getString(json, "path", getPath()));
setAcGroup(JsonTools.getString(json,"acGroupId",getAcGroup()));
setPrivilege(JsonTools.getString(json,"privilege",getAcGroup()));
setGuard(JsonTools.getBoolean(json, "guard", guard()));
setLogType(parseLogType(JsonTools.getString(json, "log", getLogType().toString())));
        this.propertySpecs.put(id, spec);						
        getProperties().SetValue(id,value);
origin: anylogic/alogic

JsonTools.setString(json, "id", getServiceID());
JsonTools.setString(json, "acGroupId",getAcGroup());
JsonTools.setString(json, "privilege", getPrivilege());
json.put("name",getName());
json.put("module",getModule());
json.put("note", getNote());
json.put("visible", getVisible());
json.put("path",getPath());
json.put("log", logType.toString());
json.put("guard",Boolean.toString(guard));
  DefaultProperties properties = (DefaultProperties) getProperties();
  Iterator<String> __keys = properties.keys().iterator();
  if (__keys.hasNext()){
origin: anylogic/alogic

public void fromXML(Element root){
  setServiceID(XmlTools.getString(root,"id",""));
  setName(XmlTools.getString(root, "name", getName()));		
  setModule(XmlTools.getString(root, "module", getModule()));
  setNote(XmlTools.getString(root,"note",getNote()));
  setVisible(XmlTools.getString(root, "visible", visible));
  setPath(XmlTools.getString(root, "path", getPath()));
  setLogType(parseLogType(XmlTools.getString(root, "log", logType.toString())));
  setGuard(XmlTools.getBoolean(root, "guard", guard()));
  setAcGroup(XmlTools.getString(root,"acGroupId",getAcGroup()));
  setPrivilege(XmlTools.getString(root,"privilege",getAcGroup()));
        spec.fromXML(e);
        this.propertySpecs.put(_id, spec);					
        getProperties().SetValue(_id,_value);
origin: anylogic/alogic

public void toXML(Element root){
  Document doc = root.getOwnerDocument();
  XmlTools.setString(root,"id",getServiceID());
  XmlTools.setString(root,"name",getName());
  XmlTools.setString(root,"note",getNote());
  XmlTools.setString(root,"module",getModule());
  XmlTools.setString(root,"visible",getVisible());
  XmlTools.setString(root,"path",getPath());
  XmlTools.setString(root, "log", logType.toString());
  XmlTools.setString(root,"guard",Boolean.toString(guard));
  XmlTools.setString(root,"acGroupId",getAcGroup());
  XmlTools.setString(root,"privilege",getPrivilege());
    DefaultProperties properties = (DefaultProperties) getProperties();
    Iterator<String> __keys = properties.keys().iterator();
    if (__keys.hasNext()){
origin: anylogic/alogic

DefaultServiceDescription sd = new DefaultServiceDescription(id);
sd.fromXML(root);
sd.setPath(childPath.getPath());
origin: anylogic/alogic

String id = name.substring(start + 1, end);
Path childPath = _path.append(id);
DefaultServiceDescription sd = new DefaultServiceDescription(childPath.getId());
sd.setModule(servant);
sd.setName(id);
sd.setPath(childPath.getPath());
sd.setNote(id);
sd.setVisible(StringUtils.isNotEmpty(visible)?visible:"public");
sd.setLogType(StringUtils.isNotEmpty(log)?log:"brief");
sd.getProperties().SetValue("script", child.toURI().toString());		
root.addService(sd.getServiceID(), sd);
com.logicbus.models.servantDefaultServiceDescription

Javadoc

ServiceDescription的缺省实现

Most used methods

  • <init>
    constructor
  • getProperties
    获取参数变量集
  • setModule
    设置服务实现代码
  • setPath
    设置服务路径
  • fromXML
  • getModule
    获得服务实现模块
  • getServiceID
    获得服务ID
  • setLogType
    设置日志类型
  • setName
    设置服务名称
  • setNote
    设置服务说明
  • setVisible
    设置服务的可见性
  • getAcGroup
  • setVisible,
  • getAcGroup,
  • getLogType,
  • getName,
  • getNote,
  • getPath,
  • getPrivilege,
  • getVisible,
  • guard,
  • parseLogType

Popular in Java

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now