use of org.apache.chemistry.opencmis.commons.impl.dataobjects.PermissionDefinitionDataImpl in project copper-cms by PogeyanOSS.
the class RepositoryActor method createPermission.
private static PermissionDefinition createPermission(String permission, String description) {
PermissionDefinitionDataImpl pd = new PermissionDefinitionDataImpl();
pd.setId(permission);
pd.setDescription(description);
return pd;
}
use of org.apache.chemistry.opencmis.commons.impl.dataobjects.PermissionDefinitionDataImpl in project alfresco-repository by Alfresco.
the class CMISConnector method getRepositoryPermissions.
private List<PermissionDefinition> getRepositoryPermissions() {
ArrayList<PermissionDefinition> result = new ArrayList<PermissionDefinition>();
Set<PermissionReference> all = permissionModelDao.getAllPermissions();
for (PermissionReference pr : all) {
result.add(createPermissionDefinition(pr));
}
PermissionReference allPermission = permissionModelDao.getPermissionReference(null, PermissionService.ALL_PERMISSIONS);
result.add(createPermissionDefinition(allPermission));
PermissionDefinitionDataImpl cmisPermission;
cmisPermission = new PermissionDefinitionDataImpl();
cmisPermission.setId(BasicPermissions.READ);
cmisPermission.setDescription("CMIS Read");
result.add(cmisPermission);
cmisPermission = new PermissionDefinitionDataImpl();
cmisPermission.setId(BasicPermissions.WRITE);
cmisPermission.setDescription("CMIS Write");
result.add(cmisPermission);
cmisPermission = new PermissionDefinitionDataImpl();
cmisPermission.setId(BasicPermissions.ALL);
cmisPermission.setDescription("CMIS All");
result.add(cmisPermission);
return result;
}
use of org.apache.chemistry.opencmis.commons.impl.dataobjects.PermissionDefinitionDataImpl in project alfresco-repository by Alfresco.
the class CMISConnector method createPermissionDefinition.
private PermissionDefinition createPermissionDefinition(PermissionReference pr) {
PermissionDefinitionDataImpl permission = new PermissionDefinitionDataImpl();
permission.setId(pr.getQName().toString() + "." + pr.getName());
permission.setDescription(permission.getId());
return permission;
}
use of org.apache.chemistry.opencmis.commons.impl.dataobjects.PermissionDefinitionDataImpl in project iaf by ibissource.
the class CmisUtils method xml2permissionDefinitionList.
private static List<PermissionDefinition> xml2permissionDefinitionList(Element cmisResult) {
List<PermissionDefinition> permissionsList = new ArrayList<PermissionDefinition>();
Element permissionsXml = XmlUtils.getFirstChildTag(cmisResult, "permissions");
for (Node node : XmlUtils.getChildTags(permissionsXml, "permission")) {
Element element = (Element) node;
PermissionDefinitionDataImpl permissionDefinition = new PermissionDefinitionDataImpl();
permissionDefinition.setId(element.getAttribute("id"));
permissionDefinition.setDescription(element.getAttribute("description"));
permissionsList.add(permissionDefinition);
}
return permissionsList;
}
use of org.apache.chemistry.opencmis.commons.impl.dataobjects.PermissionDefinitionDataImpl in project copper-cms by PogeyanOSS.
the class CopperCmsRepository method createPermission.
private static PermissionDefinition createPermission(String permission, String description) {
PermissionDefinitionDataImpl pd = new PermissionDefinitionDataImpl();
pd.setId(permission);
pd.setDescription(description);
return pd;
}
Aggregations