本文整理了Java中org.nuxeo.ecm.directory.Directory.getSchemaFieldMap()
方法的一些代码示例,展示了Directory.getSchemaFieldMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Directory.getSchemaFieldMap()
方法的具体详情如下:
包路径:org.nuxeo.ecm.directory.Directory
类名称:Directory
方法名:getSchemaFieldMap
[英]Get schema field map
[中]获取架构字段映射
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-ldap
@Override
public boolean isAuthenticating() {
return directory.getSchemaFieldMap().containsKey(getPasswordField());
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-mongodb
@Override
public boolean isAuthenticating() {
return directory.getSchemaFieldMap().containsKey(getPasswordField());
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-sql
@Override
public boolean isAuthenticating() {
return directory.getSchemaFieldMap().containsKey(getPasswordField());
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-mongodb
protected String getPrefixedIdField() {
Field idField = directory.getSchemaFieldMap().get(getIdField());
if (idField == null) {
return null;
}
return idField.getName().getPrefixedName();
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-mongodb
protected void addField(Document bson, String key, Object value) {
String keyFieldName = key;
Field field = directory.getSchemaFieldMap().get(key);
if (field != null) {
keyFieldName = field.getName().getPrefixedName();
}
bson.put(keyFieldName, value);
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-mongodb
protected String getPrefixedPasswordField() {
Field passwordField = directory.getSchemaFieldMap().get(getPasswordField());
if (passwordField == null) {
return null;
}
return passwordField.getName().getPrefixedName();
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-api
@Override
public DocumentModel getEntryFromSource(String id, boolean fetchReferences) {
String idFieldName = directory.getSchemaFieldMap().get(getIdField()).getName().getPrefixedName();
DocumentModelList result = query(Collections.singletonMap(idFieldName, id), Collections.emptySet(),
Collections.emptyMap(), true);
return result.isEmpty() ? null : result.get(0);
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-sql
protected DocumentModel fieldMapToDocumentModel(Map<String, Object> fieldMap) {
String idFieldName = directory.getSchemaFieldMap().get(getIdField()).getName().getPrefixedName();
// If the prefixed id is not here, try to get without prefix
// It may happen when we gentry from sql
if (!fieldMap.containsKey(idFieldName)) {
idFieldName = getIdField();
}
String id = String.valueOf(fieldMap.get(idFieldName));
try {
DocumentModel docModel = BaseSession.createEntryModel(sid, schemaName, id, fieldMap, isReadOnly());
return docModel;
} catch (PropertyException e) {
log.error(e, e);
return null;
}
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-mongodb
protected Document buildQuery(Map<String, Serializable> fieldMap, Set<String> fulltext) {
Map<String, Field> schemaFieldMap = directory.getSchemaFieldMap();
Document bson = new Document();
for (Map.Entry<String, Serializable> entry : fieldMap.entrySet()) {
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-ldap
@SuppressWarnings("unchecked")
protected Object getFieldValue(Attribute attribute, String fieldName, String entryId, boolean fetchReferences) {
Field field = directory.getSchemaFieldMap().get(fieldName);
Type type = field.getType();
if (type instanceof SimpleTypeImpl) {
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-ldap
for (String fieldName : directory.getSchemaFieldMap().keySet()) {
List<org.nuxeo.ecm.directory.Reference> references = directory.getReferences(fieldName);
if (references != null && references.size() > 0) {
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-mongodb
.collect(HashMap::new, (m, v) -> m.put(v.getKey(), v.getValue()),
HashMap::putAll);
Map<String, Field> schemaFieldMap = directory.getSchemaFieldMap();
String idFieldName = getPrefixedIdField();
String id = String.valueOf(fieldMap.get(idFieldName));
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-mongodb
List<String> fields = directory.getSchemaFieldMap()
.values()
.stream()
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-mongodb
@Override
protected FieldInfo walkReference(String name) {
Field field = directory.getSchemaFieldMap().get(name);
if (field == null) {
throw new QueryParseException("No column: " + name + " for directory: " + getDirectory().getName());
}
String key = field.getName().getPrefixedName();
String queryField = stripElemMatchPrefix(key);
return new FieldInfo(name, queryField, key, field.getType(), false);
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-ldap
@SuppressWarnings("unchecked")
protected Attribute getAttributeValue(String fieldName, Object value) {
Attribute attribute = new BasicAttribute(getDirectory().getFieldMapper().getBackendField(fieldName));
Field field = directory.getSchemaFieldMap().get(fieldName);
if (field == null) {
String message = String.format("Invalid field name '%s' for directory '%s' with schema '%s'", fieldName,
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-api
@Override
public DocumentModel createEntry(Map<String, Object> fieldMap) {
checkPermission(SecurityConstants.WRITE);
DocumentModel docModel = createEntryWithoutReferences(fieldMap);
// Add references fields
Map<String, Field> schemaFieldMap = directory.getSchemaFieldMap();
String idFieldName = schemaFieldMap.get(getIdField()).getName().getPrefixedName();
Object entry = fieldMap.get(idFieldName);
String sourceId = docModel.getId();
for (Reference reference : getDirectory().getReferences()) {
String referenceFieldName = schemaFieldMap.get(reference.getFieldName()).getName().getPrefixedName();
if (getDirectory().getReferences(reference.getFieldName()).size() > 1) {
if (log.isWarnEnabled()) {
log.warn("Directory " + directoryName + " cannot create field " + reference.getFieldName()
+ " for entry " + entry + ": this field is associated with more than one reference");
}
continue;
}
List<String> targetIds = toStringList(fieldMap.get(referenceFieldName));
if (reference.getClass() == referenceClass) {
reference.addLinks(sourceId, targetIds, this);
} else {
reference.addLinks(sourceId, targetIds);
}
}
getDirectory().invalidateCaches();
return docModel;
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-ldap
List<String> updateList = new ArrayList<>();
List<String> referenceFieldList = new LinkedList<>();
Map<String, Field> schemaFieldMap = directory.getSchemaFieldMap();
try {
for (String fieldName : schemaFieldMap.keySet()) {
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-sql
Map<String, Field> schemaFieldMap = directory.getSchemaFieldMap();
Field schemaIdField = schemaFieldMap.get(getIdField());
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-directory-sql
for (String fieldName : directory.getSchemaFieldMap().keySet()) {
if (fieldName.equals(getIdField())) {
continue;
内容来源于网络,如有侵权,请联系作者删除!