Package org.silverpeas.core.html
Class PermalinkRegistry
- java.lang.Object
-
- org.silverpeas.core.html.PermalinkRegistry
-
@Singleton public class PermalinkRegistry extends Object
Register of all permalink prefixes available into Silverpeas.By default, all
URLUtil.Permalink.getURLPrefix()
values are registered.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUrlPart(String urlPart)
Adds a part url of a permalink.static PermalinkRegistry
get()
boolean
isCompliant(String url)
Indicates if the given URL is compliant with a permalink definition.protected void
setupDefaults()
Stream<String>
streamAllUrlParts()
-
-
-
Method Detail
-
get
public static PermalinkRegistry get()
-
setupDefaults
@PostConstruct protected void setupDefaults()
-
addUrlPart
public void addUrlPart(String urlPart)
Adds a part url of a permalink.- Parameters:
urlPart
- a string value.
-
isCompliant
public boolean isCompliant(String url)
Indicates if the given URL is compliant with a permalink definition.- Parameters:
url
- an URL as string.- Returns:
- true is the given URL is compliant, false otherwise.
-
-