gpt4 book ai didi

org.hippoecm.addon.workflow.WorkflowDescriptorModel.getNode()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 17:33:05 27 4
gpt4 key购买 nike

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

WorkflowDescriptorModel.getNode介绍

暂无

代码示例

代码示例来源:origin: org.onehippo.cms7/hippo-cms-translation-frontend

private Node getDocumentNode() throws RepositoryException {
  WorkflowDescriptorModel wdm = (WorkflowDescriptorModel) getDefaultModel();
  if (wdm != null) {
    return wdm.getNode();
  }
  return null;
}

代码示例来源:origin: org.onehippo.cms7/hippo-addon-publication-workflow-frontend

private HippoNode getModelNode() throws RepositoryException {
  final WorkflowDescriptorModel model = (WorkflowDescriptorModel) getDefaultModel();
  return (HippoNode) model.getNode();
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-workflow-frontend

@Override
  protected void execute(WorkflowDescriptorModel model) throws Exception {
    Session session = UserSession.get().getJcrSession();
    Node folder = model.getNode();
    String[] store = new String[folderTypesList.size()];
    for (IModel propertyModel : folderTypesList) {
      store = (String[]) ArrayUtils.add(store, propertyModel.getObject());
    }
    folder.setProperty("hippostd:foldertype", store);
    session.save();
  }
});

代码示例来源:origin: org.onehippo.cms7/hippo-cms-editor-frontend

public Object preClose() {
    try {
      getModel().getNode().save();
      return new Object();
    } catch (RepositoryException ex) {
      log.info(ex.getMessage());
    }
    return null;
  }
}, context.getReference(editor).getServiceId());

代码示例来源:origin: org.onehippo.cms7/hippo-cms-editor-frontend

@Override
  protected String execute(Workflow wf) throws Exception {
    getModel().getNode().save();
    return null;
  }
});

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

public Node getNode() throws RepositoryException {
  Session session = UserSession.get().getJcrSession();
  return getNode(session);
}

代码示例来源:origin: org.onehippo.cms7/hippo-addon-publication-workflow-frontend

IModel<String> getDocumentName() {
  try {
    return (new NodeTranslator(new JcrNodeModel(((WorkflowDescriptorModel) getDefaultModel()).getNode())))
        .getNodeName();
  } catch (RepositoryException ex) {
    try {
      return new Model<String>(((WorkflowDescriptorModel) getDefaultModel()).getNode().getName());
    } catch (RepositoryException e) {
      return new StringResourceModel("unknown", this, null);
    }
  }
}

代码示例来源:origin: org.onehippo.cms7/hippo-addon-publication-workflow-frontend

IModel<String> getDocumentName() {
  try {
    return (new NodeTranslator(new JcrNodeModel(((WorkflowDescriptorModel) getDefaultModel()).getNode())))
        .getNodeName();
  } catch (RepositoryException ex) {
    try {
      return new Model<String>(((WorkflowDescriptorModel) getDefaultModel()).getNode().getName());
    } catch (RepositoryException e) {
      return new StringResourceModel("unknown", this, null);
    }
  }
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-workflow-frontend

protected IModel<String> getDocumentName() {
  try {
    final IModel<String> result = DocumentUtils.getDocumentNameModel(((WorkflowDescriptorModel) getDefaultModel()).getNode());
    if (result != null) {
      return result;
    }
  } catch (RepositoryException ignored) {
  }
  return new StringResourceModel("unknown", this, null);
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-workflow-frontend

@Override
  protected String execute(Workflow wf) throws Exception {
    Node document = getModel().getNode();
    Node folder = destination != null ? destination.getChainedModel().getObject()
        : new JcrNodeModel("/").getNode();
    String nodeName = document.getName();
    DocumentWorkflow workflow = (DocumentWorkflow) wf;
    workflow.move(new Document(folder), nodeName);
    browseTo(new JcrNodeModel(folder.getPath() + "/" + nodeName));
    return null;
  }
});

代码示例来源:origin: org.onehippo.cms7/hippo-cms-editor-frontend

private IModel<StringCodec> getStringCodecModel() {
  String locale = null;
  try {
    locale = CodecUtils.getLocaleFromNodeAndAncestors(getModel().getNode());
  } catch (RepositoryException e) {
    //ignore
  }
  return CodecUtils.getNodeNameCodecModel(getPluginContext(), locale);
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-editor-frontend

private IModel<String> getDisplayName() {
  try {
    final IModel<String> model = DocumentUtils.getDocumentNameModel(getModel().getNode());
    if (model != null) {
      return model;
    }
  } catch (RepositoryException ignored) {
  }
  return Model.of(getString("unknown"));
}

代码示例来源:origin: org.onehippo.cms7/hippo-addon-publication-workflow-frontend

@Override
protected Dialog createRequestDialog() {
  WorkflowDescriptorModel wdm = (WorkflowDescriptorModel) getDefaultModel();
  try {
    return new ScheduleDepublishDialog(this, new JcrNodeModel(wdm.getNode()), new PropertyModel(this, "date"), getEditorManager());
  } catch (RepositoryException e) {
    log.warn("could not retrieve node for scheduling depublish", e);
  }
  return null;
}

代码示例来源:origin: org.onehippo.cms7/hippo-addon-publication-workflow-frontend

@Override
protected Dialog createRequestDialog() {
  WorkflowDescriptorModel wdm = (WorkflowDescriptorModel) getDefaultModel();
  try {
    return new SchedulePublishDialog(this, new JcrNodeModel(wdm.getNode()), new PropertyModel(this, "date"), getEditorManager());
  } catch (RepositoryException ex) {
    log.warn("could not retrieve node for scheduling publish", ex);
  }
  return null;
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-translation-frontend

@Override
  protected Dialog createRequestDialog() {
    WorkflowDescriptorModel workflowModel = getModel();
    try {
      JcrNodeModel nodeModel = new JcrNodeModel(workflowModel.getNode());
      return new FolderTranslationsDialog(this, new StringResourceModel("folder-translations-title",
          FolderTranslationsWorkflowPlugin.this, null), nodeModel, getLocaleProvider());
    } catch (RepositoryException e) {
      throw new RuntimeException("Could not retrieve node for workflow", e);
    }
  }
});

代码示例来源:origin: org.onehippo.cms7/hippo-addon-publication-workflow-frontend

@Override
protected Dialog createRequestDialog() {
  WorkflowDescriptorModel wdm = (WorkflowDescriptorModel) getDefaultModel();
  try {
    return new SchedulePublishDialog(this, new JcrNodeModel(wdm.getNode()), new PropertyModel(this, "date"), getEditorManager());
  } catch (RepositoryException ex) {
    log.warn("could not retrieve node for scheduling publish", ex);
  }
  return null;
}

代码示例来源:origin: org.onehippo.cms7/hippo-addon-publication-workflow-frontend

@Override
protected Dialog createRequestDialog() {
  WorkflowDescriptorModel wdm = (WorkflowDescriptorModel) getDefaultModel();
  try {
    return new ScheduleDepublishDialog(this, new JcrNodeModel(wdm.getNode()), new PropertyModel(this, "date"), getEditorManager());
  } catch (RepositoryException e) {
    log.warn("could not retrieve node for scheduling depublish", e);
  }
  return null;
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-workflow-frontend

@Override
  public String execute(Workflow wf) throws Exception {
    final IEditorManager editorMgr = context.getService("service.edit", IEditorManager.class);
    IEditor<Node> editor = editorMgr.getEditor(new JcrNodeModel(getModel().getNode()));
    editor.done();
    return null;
  }
});

代码示例来源:origin: org.onehippo.cms7/hippo-cms-workflow-frontend

@Override
  protected String execute(Workflow wf) throws Exception {
    final IEditorManager editorMgr = context.getService("service.edit", IEditorManager.class);
    IEditor<Node> editor = editorMgr.getEditor(new JcrNodeModel(getModel().getNode()));
    editor.save();
    return null;
  }
});

代码示例来源:origin: org.onehippo.cms7/hippo-addon-publication-workflow-frontend

@Override
  protected String execute(Workflow wf) throws Exception {
    JcrNodeModel folderModel = new JcrNodeModel("/");
    if (destination != null) {
      folderModel = destination.getNodeModel();
    }
    String nodeName = (((WorkflowDescriptorModel) getDefaultModel()).getNode()).getName();
    FullReviewedActionsWorkflow workflow = (FullReviewedActionsWorkflow) wf;
    workflow.move(new Document(folderModel.getNode().getUUID()), nodeName);
    browseTo(new JcrNodeModel(folderModel.getItemModel().getPath() + "/" + nodeName));
    return null;
  }
});

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