本文整理了Java中org.nuxeo.ecm.core.api.security.ACE.getEnd()
方法的一些代码示例,展示了ACE.getEnd()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ACE.getEnd()
方法的具体详情如下:
包路径:org.nuxeo.ecm.core.api.security.ACE
类名称:ACE
方法名:getEnd
暂无
代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core-io
@Override
protected void writeEntityBody(ACP acp, JsonGenerator jg) throws IOException {
jg.writeArrayFieldStart("acl");
for (ACL acl : acp.getACLs()) {
jg.writeStartObject();
jg.writeStringField("name", acl.getName());
jg.writeArrayFieldStart("ace");
for (ACE ace : acl.getACEs()) {
jg.writeStartObject();
jg.writeStringField("id", ace.getId());
jg.writeStringField("username", ace.getUsername());
jg.writeStringField("permission", ace.getPermission());
jg.writeBooleanField("granted", ace.isGranted());
jg.writeStringField("creator", ace.getCreator());
jg.writeStringField("begin",
ace.getBegin() != null ? DateParser.formatW3CDateTime(ace.getBegin().getTime()) : null);
jg.writeStringField("end", ace.getEnd() != null ? DateParser.formatW3CDateTime(ace.getEnd().getTime())
: null);
jg.writeStringField("status", ace.getStatus().toString().toLowerCase());
jg.writeEndObject();
}
jg.writeEndArray();
jg.writeEndObject();
}
jg.writeEndArray();
}
代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core-storage-sql
protected static void addACLRow(List<ACLRow> aclrows, String name, ACE ace) {
// XXX should prefix user/group
String user = ace.getUsername();
if (user == null) {
// JCR implementation logs null and skips it
return;
}
String group = null; // XXX all in user for now
aclrows.add(new ACLRow(aclrows.size(), name, ace.isGranted(), ace.getPermission(), user, group,
ace.getCreator(), ace.getBegin(), ace.getEnd(), ace.getLongStatus()));
}
代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core-io
protected static void readACP(Element element, ACP acp) {
ACL[] acls = acp.getACLs();
for (ACL acl : acls) {
Element aclElement = element.addElement(ExportConstants.ACL_TAG);
aclElement.addAttribute(ExportConstants.NAME_ATTR, acl.getName());
ACE[] aces = acl.getACEs();
for (ACE ace : aces) {
Element aceElement = aclElement.addElement(ExportConstants.ACE_TAG);
aceElement.addAttribute(ExportConstants.PRINCIPAL_ATTR, ace.getUsername());
aceElement.addAttribute(ExportConstants.PERMISSION_ATTR, ace.getPermission());
aceElement.addAttribute(ExportConstants.GRANT_ATTR, String.valueOf(ace.isGranted()));
aceElement.addAttribute(ExportConstants.CREATOR_ATTR, ace.getCreator());
Calendar begin = ace.getBegin();
if (begin != null) {
aceElement.addAttribute(ExportConstants.BEGIN_ATTR,
DateParser.formatW3CDateTime((begin).getTime()));
}
Calendar end = ace.getEnd();
if (end != null) {
aceElement.addAttribute(ExportConstants.END_ATTR, DateParser.formatW3CDateTime((end).getTime()));
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!