use of org.structr.core.entity.SchemaRelationshipNode in project structr by structr.
the class SchemaHelper method reloadSchema.
public static boolean reloadSchema(final ErrorBuffer errorBuffer, final String initiatedBySessionId) {
try {
final App app = StructrApp.getInstance();
final List<SchemaNode> existingSchemaNodes = app.nodeQuery(SchemaNode.class).getAsList();
cleanUnusedDynamicGrants(existingSchemaNodes);
for (final SchemaNode schemaNode : existingSchemaNodes) {
createDynamicGrants(schemaNode.getResourceSignature());
}
for (final SchemaRelationshipNode schemaRelationship : StructrApp.getInstance().nodeQuery(SchemaRelationshipNode.class).getAsList()) {
createDynamicGrants(schemaRelationship.getResourceSignature());
createDynamicGrants(schemaRelationship.getInverseResourceSignature());
}
} catch (Throwable t) {
logger.warn("", t);
}
return SchemaService.reloadSchema(errorBuffer, initiatedBySessionId);
}
Aggregations