Package org.ametys.workspaces.repository
Class ConsoleHelper
- java.lang.Object
-
- org.ametys.workspaces.repository.ConsoleHelper
-
public final class ConsoleHelper extends Object
Helper methods to manipulating JCR nodes in JCR repository console
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
convertSingleToMultipleProperty(Node node, String propertyName)
Helper to convert a single-valued property to a multi-valued property.static void
setProperty(Node node, String name, Object values)
Helper to set ambiguous object values from a node property
-
-
-
Method Detail
-
setProperty
public static void setProperty(Node node, String name, Object values) throws RepositoryException
Helper to set ambiguous object values from a node property- Parameters:
node
- the nodename
- the property namevalues
- the property values as String[] or Value[]- Throws:
RepositoryException
- if an error occurred
-
convertSingleToMultipleProperty
public static boolean convertSingleToMultipleProperty(Node node, String propertyName) throws RepositoryException
Helper to convert a single-valued property to a multi-valued property. This helper checks that property exists and that it is not already multiple.- Parameters:
node
- the node holding the propertypropertyName
- the property's name- Returns:
- true if changes was made
- Throws:
RepositoryException
- if an error occurred
-
-