Package com.jalios.jcms.document.editor
Interface DocumentEditor
-
- All Known Implementing Classes:
AbstractDocumentEditor
,ImageDocumentEditor
public interface DocumentEditor
This interface must be implemented by component that what provides a service to edit a document. A DocumentEditor must be declared in properties with prefixfile-document.
and suffix.class
.Example:
file-document.editor.mySuperEditor.class: com.jalios.jcmsplugin.mySuperEditor.MySuperEditorDocumentEditor
- Since:
- jcms-10.0.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
accept(FileDocument doc, Member mbr)
Returns true if the editor accepts the member to edit the document.default java.lang.String
getButtonLabel(java.lang.String lang, FileDocument doc, Member mbr)
Return the localized label used for the button (if only this editor is available).java.lang.String
getIcon(FileDocument doc, Member mbr)
Returns the icon of the editor.default java.lang.String
getKey()
default java.lang.String
getLinkAttributes()
Returns HTML attributes to add to the link.default java.lang.String
getLinkAttributes(java.lang.String lang, FileDocument doc, Member mbr)
Returns HTML attributes to add to the link.default java.lang.String
getLinkCss()
Returns CSS classes to add to the link.default java.lang.String
getMenuLabel(java.lang.String lang, FileDocument doc, Member mbr)
Return the localized label used in the dropdown menu.java.lang.String
getName(java.lang.String lang)
Returns the localized name of the editor.java.lang.String
getUrl(FileDocument doc, Member mbr, java.lang.String baseUrl)
Returns the URL to edit the document.default void
setKey(java.lang.String key)
-
-
-
Method Detail
-
accept
boolean accept(FileDocument doc, Member mbr)
Returns true if the editor accepts the member to edit the document.- Parameters:
doc
- the documentmbr
- the member- Returns:
- true if the editor accepts the member to edit the document.
- Since:
- jcms-10.0.3
-
getUrl
java.lang.String getUrl(FileDocument doc, Member mbr, java.lang.String baseUrl)
Returns the URL to edit the document.- Parameters:
doc
- the documentmbr
- the memberbaseUrl
- the base URL of the site- Returns:
- the URL to edit the document.
- Since:
- jcms-10.0.3
-
getName
java.lang.String getName(java.lang.String lang)
Returns the localized name of the editor.- Parameters:
lang
- the language- Returns:
- the localized name of the editor.
- Since:
- jcms-10.0.3
-
getIcon
java.lang.String getIcon(FileDocument doc, Member mbr)
Returns the icon of the editor.- Parameters:
doc
- the documentmbr
- the document- Returns:
- the icon of the editor.
- Since:
- jcms-10.0.3
-
getMenuLabel
default java.lang.String getMenuLabel(java.lang.String lang, FileDocument doc, Member mbr)
Return the localized label used in the dropdown menu.- Parameters:
lang
- the languagedoc
- the documentmbr
- the document- Returns:
- the localized label used in the dropdown menu.
- Since:
- jcms-10.0.3
-
getButtonLabel
default java.lang.String getButtonLabel(java.lang.String lang, FileDocument doc, Member mbr)
Return the localized label used for the button (if only this editor is available).- Parameters:
lang
- the languagedoc
- the documentmbr
- the document- Returns:
- the localized label used for the button (if only this editor is available).
- Since:
- jcms-10.0.3
-
getLinkCss
default java.lang.String getLinkCss()
Returns CSS classes to add to the link.- Returns:
- CSS classes to add to the link.
- Since:
- jcms-10.0.3
-
getLinkAttributes
default java.lang.String getLinkAttributes()
Returns HTML attributes to add to the link.- Returns:
- HTML attributes to add to the link.
- Since:
- jcms-10.0.3
-
getLinkAttributes
default java.lang.String getLinkAttributes(java.lang.String lang, FileDocument doc, Member mbr)
Returns HTML attributes to add to the link.- Parameters:
lang
- the languagedoc
- the documentmbr
- the document- Returns:
- HTML attributes to add to the link.
- Since:
- jcms-10.0.6
-
getKey
default java.lang.String getKey()
-
setKey
default void setKey(java.lang.String key)
-
-