Package org.ametys.plugins.linkdirectory
Interface Link
-
- All Known Implementing Classes:
DefaultLink
public interface Link
A link in the directory.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLink.LinkStatusStatus of a link.static classLink.LinkTypeType of a link.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetAlternative()Get the link alternative.StringgetColor()Get the color.StringgetContent()Get the link content.StringgetDynamicInformationProvider()Get the id of the provider of dynamic information.BinarygetExternalPicture()Get the picture as a binary metadata.StringgetInternalUrl()Get the internal URL.StringgetPage()Get the page.StringgetPictureAlternative()Get the picture alternative.StringgetPictureGlyph()Get the picture glyph.StringgetPictureType()Get the picture type.StringgetResourcePictureId()Get the picture resource ID.Link.LinkStatusgetStatus()Get the status.String[]getThemes()Get the themes.StringgetTitle()Get the link title.StringgetUrl()Get the URL.Link.LinkTypegetUrlType()Retrieves the linked URL type.voidremoveTheme(String themeId)Remove theme if existvoidsetAlternative(String alternative)Set the link alternative.voidsetColor(String color)Set the color.voidsetContent(String content)Set the content.voidsetDynamicInformationProvider(String providerId)Set the id of the provider of dynamic information.voidsetExternalPicture(String mimeType, String filename, InputStream stream)Set the picture from an external file.voidsetInternalUrl(String url)Set the internal URL.voidsetNoPicture()Removes any picture currently assigned.voidsetPage(String pageId)Set the page.voidsetPictureAlternative(String alternative)Set the picture alternative.voidsetPictureGlyph(String glyph)Set the picture glyph.voidsetPictureType(String type)Set the picture type.voidsetResourcePicture(String resourceId)Set the picture from an explorer resource.voidsetStatus(Link.LinkStatus status)Set the status.voidsetThemes(String[] themes)Set the themes.voidsetTitle(String title)Set the title.voidsetUrl(Link.LinkType type, String url)Set the URL.
-
-
-
Method Detail
-
getUrl
String getUrl() throws AmetysRepositoryException
Get the URL.- Returns:
- the link URL.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setUrl
void setUrl(Link.LinkType type, String url) throws AmetysRepositoryException
Set the URL.- Parameters:
type- The URL typeurl- the link URL to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
getInternalUrl
String getInternalUrl() throws AmetysRepositoryException
Get the internal URL.- Returns:
- the link internal URL.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setInternalUrl
void setInternalUrl(String url) throws AmetysRepositoryException
Set the internal URL.- Parameters:
url- the link internal URL to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
getUrlType
Link.LinkType getUrlType() throws AmetysRepositoryException
Retrieves the linked URL type.- Returns:
- the linked URL type.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getTitle
String getTitle() throws AmetysRepositoryException
Get the link title.- Returns:
- the link title.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setTitle
void setTitle(String title) throws AmetysRepositoryException
Set the title.- Parameters:
title- the link title to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
getContent
String getContent() throws AmetysRepositoryException
Get the link content.- Returns:
- the link content.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setContent
void setContent(String content) throws AmetysRepositoryException
Set the content.- Parameters:
content- the link content to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
getAlternative
String getAlternative() throws AmetysRepositoryException
Get the link alternative.- Returns:
- the link alternative.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setAlternative
void setAlternative(String alternative) throws AmetysRepositoryException
Set the link alternative.- Parameters:
alternative- the link alternative to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
getExternalPicture
Binary getExternalPicture() throws AmetysRepositoryException
Get the picture as a binary metadata.- Returns:
- the picture as a binary metadata.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setExternalPicture
void setExternalPicture(String mimeType, String filename, InputStream stream) throws AmetysRepositoryException
Set the picture from an external file.- Parameters:
mimeType- the file MIME type.filename- the file name.stream- an input stream on the file bytes.- Throws:
AmetysRepositoryException- if an error occurs.
-
getResourcePictureId
String getResourcePictureId() throws AmetysRepositoryException
Get the picture resource ID.- Returns:
- the resource ID.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setResourcePicture
void setResourcePicture(String resourceId) throws AmetysRepositoryException
Set the picture from an explorer resource.- Parameters:
resourceId- the resource ID.- Throws:
AmetysRepositoryException- if an error occurs.
-
setNoPicture
void setNoPicture() throws AmetysRepositoryException
Removes any picture currently assigned.- Throws:
AmetysRepositoryException- if an error occurs.
-
getPictureType
String getPictureType() throws AmetysRepositoryException
Get the picture type.- Returns:
- the picture type.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setPictureType
void setPictureType(String type) throws AmetysRepositoryException
Set the picture type.- Parameters:
type- the picture type to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
getPictureGlyph
String getPictureGlyph() throws AmetysRepositoryException
Get the picture glyph.- Returns:
- the picture glyph.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setPictureGlyph
void setPictureGlyph(String glyph) throws AmetysRepositoryException
Set the picture glyph.- Parameters:
glyph- the glyph picture to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
getPictureAlternative
String getPictureAlternative() throws AmetysRepositoryException
Get the picture alternative.- Returns:
- the picture alternative.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setPictureAlternative
void setPictureAlternative(String alternative) throws AmetysRepositoryException
Set the picture alternative.- Parameters:
alternative- the picture alternative to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
getThemes
String[] getThemes() throws AmetysRepositoryException
Get the themes.- Returns:
- the themes in an Array
- Throws:
AmetysRepositoryException- if an error occurs.
-
setThemes
void setThemes(String[] themes) throws AmetysRepositoryException
Set the themes.- Parameters:
themes- the themes to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
removeTheme
void removeTheme(String themeId) throws AmetysRepositoryException
Remove theme if exist- Parameters:
themeId- The id of theme to remove- Throws:
AmetysRepositoryException- if an error occurs
-
getDynamicInformationProvider
String getDynamicInformationProvider() throws AmetysRepositoryException
Get the id of the provider of dynamic information.- Returns:
- the id of provider. Can be null.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setDynamicInformationProvider
void setDynamicInformationProvider(String providerId) throws AmetysRepositoryException
Set the id of the provider of dynamic information.- Parameters:
providerId- the id of provider- Throws:
AmetysRepositoryException- if an error occurs.
-
getColor
String getColor() throws AmetysRepositoryException
Get the color.- Returns:
- the color.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setColor
void setColor(String color) throws AmetysRepositoryException
Set the color.- Parameters:
color- the color to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
getPage
String getPage() throws AmetysRepositoryException
Get the page.- Returns:
- the page.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setPage
void setPage(String pageId) throws AmetysRepositoryException
Set the page.- Parameters:
pageId- the page id to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
getStatus
Link.LinkStatus getStatus() throws AmetysRepositoryException
Get the status.- Returns:
- the status.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setStatus
void setStatus(Link.LinkStatus status) throws AmetysRepositoryException
Set the status.- Parameters:
status- the status to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
-