Package org.silverpeas.core.util
Interface ResourcePath<T extends SilverpeasResource>
-
- All Superinterfaces:
Collection<T>
,Iterable<T>
,List<T>
- All Known Implementing Classes:
CalendarComponentPath
,ComponentInstPath
,ContributionPath
,NodePath
,PublicationPath
,SpacePath
public interface ResourcePath<T extends SilverpeasResource> extends List<T>
The path of a resource in the organization tree of Silverpeas. The path is represented here by a list of the resources that made up the path ordered from the upper parent down to the resource (the last element). Each typeof resource in Silverpeas should implement this interface in order to compute their path in the organizational tree of Silverpeas.- Author:
- mmoquillon
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ResourcePath.Constants
Constants
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default String
format(String language)
Formats an relative textual path with the name of each of the resources constitutive of the path (and therefore in this list).default String
format(String language, boolean absolutePath)
Formats a textual path with the name of each of the resources constitutive of the path (and therefore in this list).String
format(String language, boolean absolutePath, String pathSep)
Formats a textual path with the name of each of the resources constitutive of the path (and therefore in this list).-
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
-
-
-
-
Method Detail
-
format
default String format(String language)
Formats an relative textual path with the name of each of the resources constitutive of the path (and therefore in this list). The relativity of the path depends on the implementation of this interface.- Parameters:
language
- the language in which the name should be expressed in the path.- Returns:
- a String representation of the path or an empty String if this path is empty.
-
format
default String format(String language, boolean absolutePath)
Formats a textual path with the name of each of the resources constitutive of the path (and therefore in this list). The relativity of the path depends on the implementation of this interface. The absolute path must be computed from the root space to which the resources in this path are a descendent.- 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.- Returns:
- a String representation of the path or an empty String if this path is empty.
-
format
String format(String language, boolean absolutePath, String pathSep)
Formats a textual path with the name of each of the resources constitutive of the path (and therefore in this list). The relativity of the path depends on the implementation of this interface. The absolute path must be computed from the root space to which the resources in this path are a descendent.- 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:
- a String representation of the path or an empty String if this path is empty.
-
-