Ate Douma pushed to branch release/4.1 at cms-community / hippo-repository
Commits: 8f303531 by Ate Douma at 2016-11-07T14:38:01+01:00 REPO-1496 add missing Node and Property decorations Patch provided by Wolfgang Illmeyer. - - - - - 2 changed files: - connector/src/main/java/org/hippoecm/repository/decorating/NodeDecorator.java - connector/src/main/java/org/hippoecm/repository/decorating/PropertyDecorator.java Changes: ===================================== connector/src/main/java/org/hippoecm/repository/decorating/NodeDecorator.java ===================================== --- a/connector/src/main/java/org/hippoecm/repository/decorating/NodeDecorator.java +++ b/connector/src/main/java/org/hippoecm/repository/decorating/NodeDecorator.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2013 Hippo B.V. (http://www.onehippo.com) + * Copyright 2008-2016 Hippo B.V. (http://www.onehippo.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -562,19 +562,19 @@ public abstract class NodeDecorator extends ItemDecorator implements HippoNode { public Property setProperty(String name, Binary value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException { - return node.setProperty(name, value); + return factory.getPropertyDecorator(session, node.setProperty(name, value)); } public Property setProperty(String name, BigDecimal value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException { - return node.setProperty(name, value); + return factory.getPropertyDecorator(session, node.setProperty(name, value)); } public NodeIterator getNodes(String[] nameGlobs) throws RepositoryException { - return node.getNodes(nameGlobs); + return new NodeIteratorDecorator(factory, session, node.getNodes(nameGlobs), this); } public PropertyIterator getProperties(String[] nameGlobs) throws RepositoryException { - return node.getProperties(nameGlobs); + return new PropertyIteratorDecorator(factory, session, node.getProperties(nameGlobs)); } public String getIdentifier() throws RepositoryException { @@ -582,15 +582,15 @@ public abstract class NodeDecorator extends ItemDecorator implements HippoNode { } public PropertyIterator getReferences(String name) throws RepositoryException { - return node.getReferences(name); + return new PropertyIteratorDecorator(factory, session, node.getReferences(name)); } public PropertyIterator getWeakReferences() throws RepositoryException { - return node.getWeakReferences(); + return new PropertyIteratorDecorator(factory, session, node.getWeakReferences()); } public PropertyIterator getWeakReferences(String name) throws RepositoryException { - return node.getWeakReferences(name); + return new PropertyIteratorDecorator(factory, session, node.getWeakReferences(name)); } public void setPrimaryType(String nodeTypeName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException { @@ -598,7 +598,7 @@ public abstract class NodeDecorator extends ItemDecorator implements HippoNode { } public NodeIterator getSharedSet() throws RepositoryException { - return node.getSharedSet(); + return new NodeIteratorDecorator(factory, session, node.getSharedSet(), this); } public void removeSharedSet() throws VersionException, LockException, ConstraintViolationException, RepositoryException { ===================================== connector/src/main/java/org/hippoecm/repository/decorating/PropertyDecorator.java ===================================== --- a/connector/src/main/java/org/hippoecm/repository/decorating/PropertyDecorator.java +++ b/connector/src/main/java/org/hippoecm/repository/decorating/PropertyDecorator.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2013 Hippo B.V. (http://www.onehippo.com) + * Copyright 2008-2016 Hippo B.V. (http://www.onehippo.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -231,7 +231,7 @@ public class PropertyDecorator extends ItemDecorator implements Property { } public Property getProperty() throws ItemNotFoundException, ValueFormatException, RepositoryException { - return property.getProperty(); + return factory.getPropertyDecorator(session, property.getProperty()); } public boolean isMultiple() throws RepositoryException { View it on GitLab: https://code.onehippo.org/cms-community/hippo-repository/commit/8f303531ea17c338c043ef8c6ceeb2dbd00a6146
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn