gpt4 book ai didi

org.brixcms.workspace.Workspace类的使用及代码示例

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

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

Workspace介绍

[英]Represents a single workspace. Allows to set and query workspace attributes. To obtain a workspace object use WorkspaceManager.
[中]表示单个工作区。允许设置和查询工作区属性。要获取工作空间对象,请使用WorkspaceManager。

代码示例

代码示例来源:origin: brix-cms/brix-cms

public void setObject(Workspace workspace) {
  if (workspace != null) {
    this.workspaceId = workspace.getId();
  } else {
    this.workspaceId = null;
  }
  this.workspace = workspace;
}

代码示例来源:origin: brix-cms/brix-cms

/**
 * Gets the Comment for the Workspace
 *
 * @param workspace the comment holding Workspace
 * @return the comment of the Workspace as String
 */
public String getComment(Workspace workspace) {
  return workspace.getAttribute(WORKSPACE_COMMENT);
}

代码示例来源:origin: brix-cms/brix-cms

/**
 * Sets the Comment for the Workspace
 *
 * @param workspace the comment holding Workspace
 * @param comment   the comment for the Workspace
 */
public void setComment(Workspace workspace, String comment) {
  workspace.setAttribute(WORKSPACE_COMMENT, comment);
}

代码示例来源:origin: brix-cms/brix-cms

public void createPrototype(Workspace originalWorkspace, String prototypeName) {
  Workspace workspace = brix.getWorkspaceManager().createWorkspace();
  workspace.setAttribute(Brix.WORKSPACE_ATTRIBUTE_TYPE, WORKSPACE_TYPE);
  setPrototypeName(workspace, prototypeName);
  JcrSession originalSession = brix.getCurrentSession(originalWorkspace.getId());
  JcrSession destSession = brix.getCurrentSession(workspace.getId());
  brix.clone(originalSession, destSession);
}

代码示例来源:origin: brix-cms/brix-cms

public void delete() throws RemoteException {
  delegate.delete();
}

代码示例来源:origin: brix-cms/brix-cms

public Iterator<String> getAttributeKeys() throws RemoteException {
  return delegate.getAttributeKeys();
}

代码示例来源:origin: brix-cms/brix-cms

public void createSnapshot(Workspace workspace, String comment) {
  if (!SitePlugin.get().isSiteWorkspace(workspace)) {
    throw new IllegalStateException("Workspace must be a Site workspace");
  }
  Workspace targetWorkspace = brix.getWorkspaceManager().createWorkspace();
  targetWorkspace.setAttribute(Brix.WORKSPACE_ATTRIBUTE_TYPE, WORKSPACE_TYPE);
  targetWorkspace.setAttribute(WORKSPACE_ATTRIBUTE_SITE_NAME, SitePlugin.get().getWorkspaceName(workspace));
  targetWorkspace.setAttribute(WORKSPACE_COMMENT, comment);
  setCreated(targetWorkspace, new Date());
  JcrSession originalSession = brix.getCurrentSession(workspace.getId());
  JcrSession targetSession = brix.getCurrentSession(targetWorkspace.getId());
  brix.clone(originalSession, targetSession);
}

代码示例来源:origin: brix-cms/brix-cms

public String getIdValue(Workspace object, int index) {
    return object.getId();
  }
}

代码示例来源:origin: brix-cms/brix-cms

public void createPrototype(List<JcrNode> nodes, String prototypeName) {
  if (nodes.isEmpty()) {
    throw new IllegalStateException("Node list can not be empty.");
  }
  Workspace workspace = brix.getWorkspaceManager().createWorkspace();
  workspace.setAttribute(Brix.WORKSPACE_ATTRIBUTE_TYPE, WORKSPACE_TYPE);
  setPrototypeName(workspace, prototypeName);
  JcrSession destSession = brix.getCurrentSession(workspace.getId());
  JcrUtil.cloneNodes(nodes, destSession.getRootNode());
  destSession.save();
}

代码示例来源:origin: brix-cms/brix-cms

public String getWorkspaceName(Workspace workspace) {
  return workspace.getAttribute(WORKSPACE_ATTRIBUTE_NAME);
}

代码示例来源:origin: brix-cms/brix-cms

public void setWorkspaceState(Workspace workspace, String state) {
  workspace.setAttribute(WORKSPACE_ATTRIBUTE_STATE, state);
}

代码示例来源:origin: brix-cms/brix-cms

public String getId() throws RemoteException {
  return delegate.getId();
}

代码示例来源:origin: brix-cms/brix-cms

public String getAttribute(String attributeKey) throws RemoteException {
  return delegate.getAttribute(attributeKey);
}

代码示例来源:origin: brix-cms/brix-cms

public void setPrototypeName(Workspace workspace, String name) {
  workspace.setAttribute(WORKSPACE_ATTRIBUTE_PROTOTYPE_NAME, name);
}

代码示例来源:origin: brix-cms/brix-cms

@Override
  public String getObject() {
    return workspaceModel.getObject().getId();
  }
});

代码示例来源:origin: brix-cms/brix-cms

public String getSnapshotSiteName(Workspace workspace) {
  return workspace.getAttribute(WORKSPACE_ATTRIBUTE_SITE_NAME);
}

代码示例来源:origin: brix-cms/brix-cms

public void setAttribute(String attributeKey, String attributeValue) throws RemoteException {
    delegate.setAttribute(attributeKey, attributeValue);
  }
}

代码示例来源:origin: brix-cms/brix-cms

@Override
  public javax.swing.tree.TreeNode getRoot() {
    Workspace workspace = workspaceModel.getObject();
    return getTreeNode(SitePlugin.get().getSiteRootNode(workspace.getId()));
  }
}

代码示例来源:origin: brix-cms/brix-cms

public String getPrototypeName(Workspace workspace) {
  return workspace.getAttribute(WORKSPACE_ATTRIBUTE_PROTOTYPE_NAME);
}

代码示例来源:origin: brix-cms/brix-cms

public void setWorkspaceName(Workspace workspace, String name) {
  workspace.setAttribute(WORKSPACE_ATTRIBUTE_NAME, name);
}

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