if (schema != null && schema.hasField(prop)) { if (returnName != null) { returnName[0] = prop;
throw new DirectoryException(directorySchema + " is not a registered directory"); if (level == 0 && schema.hasField(PARENT_FIELD_ID)) {
protected DocumentModelList getChildrenEntries() { if (childrenEntries != null) { // memorized directory lookup since directory content is not // suppose to change // XXX: use the cache manager instead of field caching strategy return childrenEntries; } try (Session session = getDirectorySession()) { if (level == 0) { String schemaName = getDirectorySchema(); SchemaManager schemaManager = Framework.getService(SchemaManager.class); Schema schema = schemaManager.getSchema(schemaName); if (schema.hasField(PARENT_FIELD_ID)) { // filter on empty parent Map<String, Serializable> filter = new HashMap<String, Serializable>(); filter.put(PARENT_FIELD_ID, ""); childrenEntries = session.query(filter); } else { childrenEntries = session.getEntries(); } } else { Map<String, Serializable> filter = new HashMap<String, Serializable>(); String[] bitsOfPath = path.split("/"); filter.put(PARENT_FIELD_ID, bitsOfPath[level - 1]); childrenEntries = session.query(filter); } return childrenEntries; } }
if (!equality(value, oldValue)) { if (!allowGlobalVariablesAssignement && (transientSchema == null || !transientSchema.hasField(key))) { throw new DocumentRouteException(String.format( "You don't have the permission to set the workflow variable %s", key));
if (!schema.hasField(PARENT_FIELD_ID)) { throw new DirectoryException(directoryName + "does not have the required field: " + PARENT_FIELD_ID);
for (Field f : type.getFields()) { String name = f.getName().getLocalName(); if (transientSchema.hasField(name)) { Property property = hasFacet ? route.getDocument().getProperty(name) : null; OutputStream out = new OutputStreamWithJsonWriter(jg);