public JcrEntityAPI(Node node, ArtefactPath path, boolean oldVersion) throws RepositoryException { super(node, path.segment(path.segmentCount() - 1), oldVersion); this.path = path; version = new JcrVersion(node); properties = new HashMap<String, org.openl.rules.common.Property>(); initProperties(); props = new HashMap<String, Object>(); loadProps(); }
public JcrEntityAPI(Node node, ArtefactPath path, boolean oldVersion) throws RepositoryException { super(node, path.segment(path.segmentCount() - 1), oldVersion); this.path = path; version = new JcrVersion(node); properties = new HashMap<String, org.openl.rules.common.Property>(); initProperties(); props = new HashMap<String, Object>(); loadProps(); }
@Override public Map<String, InheritedProperty> getInheritedProps() { int segmentId = path.segmentCount(); if (segmentId > 1) { LocalArtefactAPI parentArtefactAPI = new LocalArtefactAPI(source.getParentFile(), path.withoutSegment(segmentId - 1), workspace); Map<String, InheritedProperty> inheritedProps = new HashMap<String, InheritedProperty>(); inheritedProps.putAll(parentArtefactAPI.getInheritedProps()); if (parentArtefactAPI.getProps() != null) { Map<String, Object> parentProp = parentArtefactAPI.getProps(); for (Map.Entry<String, Object> entry: parentProp.entrySet()) { InheritedProperty inhProp = new InheritedProperty(entry.getValue(), (parentArtefactAPI.source.isDirectory() ? ArtefactType.FOLDER : ArtefactType.PROJECT ), parentArtefactAPI.getName() ); inheritedProps.put(entry.getKey(), inhProp); } } return inheritedProps; } return new HashMap<String, InheritedProperty>(); }
try { AProjectFolder folder = selectedProject; for (int i = 0; i < artefactPath.segmentCount() - 1; i++) { String segment = artefactPath.segment(i); if (!folder.hasArtefact(segment)) { .addResource(artefactPath.segment(artefactPath.segmentCount() - 1), is); fileName = addedFileResource.getName(); repositoryTreeState
try { AProjectFolder folder = selectedProject; for (int i = 0; i < artefactPath.segmentCount() - 1; i++) { String segment = artefactPath.segment(i); if (!folder.hasArtefact(segment)) { .addResource(artefactPath.segment(artefactPath.segmentCount() - 1), is); fileName = addedFileResource.getName(); repositoryTreeState