Class ComponentInstPath
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<ComponentInstLight>
-
- org.silverpeas.core.admin.component.model.ComponentInstPath
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<ComponentInstLight>
,Collection<ComponentInstLight>
,List<ComponentInstLight>
,RandomAccess
,ResourcePath<ComponentInstLight>
public class ComponentInstPath extends ArrayList<ComponentInstLight> implements ResourcePath<ComponentInstLight>
The path of a component instance in the Silverpeas resources organizational tree.- Author:
- mmoquillon
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.silverpeas.core.util.ResourcePath
ResourcePath.Constants
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
format(String language, boolean absolutePath, String pathSep)
Formats this path as a textual value in which each segment is separated by the specified separator token.static ComponentInstPath
getPath(String instanceId)
Gets the path of the specified component instance.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Methods inherited from interface org.silverpeas.core.util.ResourcePath
format, format
-
-
-
-
Method Detail
-
getPath
public static ComponentInstPath getPath(String instanceId)
Gets the path of the specified component instance.- Parameters:
instanceId
- the unique identifier of a component instance.- Returns:
- a
ComponentInstPath
instance.
-
format
public String format(String language, boolean absolutePath, String pathSep)
Formats this path as a textual value in which each segment is separated by the specified separator token. Each path segment is the name of the spaces (and at the end of the component instance) in this path expressed in the given language. If only a relative path is asked, then the path starts with name of the space that contains the component instance targeted by this path. Otherwise, the path starts with the root space for which the targeted component instance is a descendent. If this path is empty, then an empty String is returned.- Specified by:
format
in interfaceResourcePath<ComponentInstLight>
- Parameters:
language
- the language in which the name should be expressed in the path.absolutePath
- if false, only a relative path is returned. If true, an absolute path is returned.pathSep
- the path separator to use instead of the default one.- Returns:
- the String representation of this path by using the given path separator and in which each path segment is the element's name in the specified language.
-
-