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 class
Link.LinkStatus
Status of a link.static class
Link.LinkType
Type of a link.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getAlternative()
Get the link alternative.String
getColor()
Get the color.String
getContent()
Get the link content.String
getDynamicInformationProvider()
Get the id of the provider of dynamic information.Binary
getExternalPicture()
Get the picture as a binary metadata.String
getInternalUrl()
Get the internal URL.String
getPage()
Get the page.String
getPictureAlternative()
Get the picture alternative.String
getPictureGlyph()
Get the picture glyph.String
getPictureType()
Get the picture type.String
getResourcePictureId()
Get the picture resource ID.Link.LinkStatus
getStatus()
Get the status.String[]
getThemes()
Get the themes.String
getTitle()
Get the link title.String
getUrl()
Get the URL.Link.LinkType
getUrlType()
Retrieves the linked URL type.void
removeTheme(String themeId)
Remove theme if existvoid
setAlternative(String alternative)
Set the link alternative.void
setColor(String color)
Set the color.void
setContent(String content)
Set the content.void
setDynamicInformationProvider(String providerId)
Set the id of the provider of dynamic information.void
setExternalPicture(String mimeType, String filename, InputStream stream)
Set the picture from an external file.void
setInternalUrl(String url)
Set the internal URL.void
setNoPicture()
Removes any picture currently assigned.void
setPage(String pageId)
Set the page.void
setPictureAlternative(String alternative)
Set the picture alternative.void
setPictureGlyph(String glyph)
Set the picture glyph.void
setPictureType(String type)
Set the picture type.void
setResourcePicture(String resourceId)
Set the picture from an explorer resource.void
setStatus(Link.LinkStatus status)
Set the status.void
setThemes(String[] themes)
Set the themes.void
setTitle(String title)
Set the title.void
setUrl(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.
-
-