gpt4 book ai didi

org.hippoecm.repository.api.WorkflowDescriptor.getInterfaces()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 16:21:05 27 4
gpt4 key购买 nike

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

WorkflowDescriptor.getInterfaces介绍

[英]Obtain the workflow interfaces implemented by this workflow.
[中]

代码示例

代码示例来源:origin: org.onehippo.cms7/hippo-repository-connector

public String[] getInterfaces() throws ClassNotFoundException, RepositoryException, RemoteException {
  Class<Workflow>[] interfaces = descriptor.getInterfaces();
  String[] classes = new String[interfaces.length];
  for(int i=0; i<interfaces.length; i++) {
    classes[i] = interfaces[i].getName();
  }
  return classes;
}

代码示例来源:origin: org.onehippo.cms7/hippo-repository-engine

RemoteWorkflowDescriptor(WorkflowDescriptor workflowDescriptor, String category, String identifier) throws RepositoryException {
    this.category = category;
    this.identifier = identifier;
    this.display = workflowDescriptor.getDisplayName();
    this.attributes = new TreeMap<String, String>();
    for (String attributeKey : workflowDescriptor.getAttribute(null).split(" "))
      this.attributes.put(attributeKey, workflowDescriptor.getAttribute(attributeKey));
    this.hints = workflowDescriptor.hints();
    try {
      Class<Workflow>[] workflowInterfaces = workflowDescriptor.getInterfaces();
      if (workflowInterfaces != null) {
        this.interfaces = new String[workflowInterfaces.length];
        for (int i = 0; i < workflowInterfaces.length; i++) {
          this.interfaces[i] = workflowInterfaces[i].getName();
        }
      } else {
        this.interfaces = null;
      }
    } catch (ClassNotFoundException ex) {
      this.interfaces = null;
    }
  }
}

代码示例来源:origin: org.onehippo.cms7/hippo-repository-testutils

protected boolean isApplicableMethod(Node node) throws Exception {
  WorkflowDescriptor descriptor = getWorkflowDescriptor(node);
  if (descriptor == null) {
    return false;
  }
  for (Class<Workflow> c : descriptor.getInterfaces()) {
    if (c.equals(getWorkflowClass())) {
      Map<String, Serializable> hints = descriptor.hints();
      if (hints == null) {
        return true;
      }
      Serializable info = hints.get(getWorkflowMethodName());
      if (info instanceof Boolean) {
        return (Boolean) info;
      } else {
        // don't understand, try it
        return true;
      }
    }
  }
  return false;
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com