|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.wysiwyg.control.WysiwygManager
public class WysiwygManager
Central service to manage Wysiwyg.
Field Summary | |
---|---|
static String |
WYSIWYG_CONTEXT
|
static String |
WYSIWYG_IMAGES
|
static String |
WYSIWYG_WEBSITES
|
Constructor Summary | |
---|---|
protected |
WysiwygManager()
|
Method Summary | |
---|---|
void |
addToIndex(FullIndexEntry indexEntry,
ForeignPK pk,
String language)
Add all elements attached to object identified by the given index into the given index |
Map<String,String> |
copy(String oldComponentId,
String oldObjectId,
String componentId,
String objectId,
String userId)
Method declaration |
protected File |
createFile(String cheminFichier,
String nomFichier,
String contenuFichier)
Creation or update of a file |
void |
createFileAndAttachment(String textHtml,
WAPrimaryKey foreignKey,
String userId,
String contentLanguage)
Method declaration creation of the file and its attachment. |
void |
createFileAndAttachment(String textHtml,
WAPrimaryKey foreignKey,
String context,
String userId,
String contentLanguage)
Creation of the file and its attachment. |
String |
createPath(String componentId,
String context)
To create path. |
void |
createUnindexedFileAndAttachment(String textHtml,
WAPrimaryKey foreignKey,
String userId,
String contentLanguage)
Method declaration creation of the file and its attachment. |
void |
deleteFile(String componentId,
String objectId,
String language)
|
void |
deleteFileAndAttachment(String componentId,
String id)
|
void |
deleteWysiwygAttachments(String componentId,
String objectId)
Method declaration remove the file attached. |
void |
deleteWysiwygAttachmentsOnly(String spaceId,
String componentId,
String objectId)
La méthode deleteWysiwygAttachments efface tous les attachments de la publication donc pour éviter une éventuelle régression, je crée une nouvelle méthode |
List<String> |
getEmbeddedAttachmentIds(String content)
Get all Silverpeas Files linked by wysiwyg content |
List<ComponentInstLight> |
getGalleries()
|
List<SimpleDocument> |
getImages(String id,
String componentId)
Turn over all the images attached according to the parameters id, componentId. |
String |
getImagesFileName(String objectId)
Method declaration built the name of the images to be attached. |
String |
getOldWysiwygFileName(String objectId)
Build the name of the file to be attached. |
List<ComponentInstLight> |
getStorageFile()
Gets the components dedicated to file storage |
String[][] |
getWebsiteImages(String path,
String componentId)
Get images of the website. |
String[][] |
getWebsitePages(String path,
String componentId)
Method declaration Get html pages of the website |
String |
getWebsiteRepository()
|
String |
getWysiwygFileName(String objectId,
String currentLanguage)
|
String |
getWysiwygPath(String componentId,
String objectId)
|
String |
getWysiwygPath(String componentId,
String objectId,
String language)
|
boolean |
haveGotWysiwyg(String componentId,
String objectId,
String language)
|
boolean |
haveGotWysiwygToDisplay(String componentId,
String objectId,
String language)
|
void |
indexEmbeddedLinkedFiles(FullIndexEntry indexEntry,
List<String> embeddedAttachmentIds)
Index given embedded linked files |
String |
load(String componentId,
String objectId,
String language)
Load wysiwyg content. |
String |
loadFileWebsite(String path,
String fileName)
Method declaration return the contents of the file. |
void |
move(String fromComponentId,
String fromObjectId,
String componentId,
String objectId)
|
void |
save(String textHtml,
String componentId,
String objectId,
String userId,
String language,
boolean indexIt)
|
void |
updateFileAndAttachment(String textHtml,
String componentId,
String objectId,
String userId,
String language)
Method declaration remove and recreates the file attached |
void |
updateFileAndAttachment(String textHtml,
String componentId,
String objectId,
String userId,
String language,
boolean indexIt)
|
void |
updateWebsite(String cheminFichier,
String nomFichier,
String contenuFichier)
updateWebsite : creation or update of a file of a website Param = cheminFichier = c:\\j2sdk\\public_html\\WAUploads\\webSite10\\nomSite\\rep1\\rep2 nomFichier = index.html contenuFichier = code du fichier : " |
void |
wysiwygPlaceHaveChanged(String oldComponentId,
String oldObjectId,
String newComponentId,
String newObjectId)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String WYSIWYG_CONTEXT
public static final String WYSIWYG_IMAGES
public static final String WYSIWYG_WEBSITES
Constructor Detail |
---|
protected WysiwygManager()
Method Detail |
---|
public List<SimpleDocument> getImages(String id, String componentId)
id
- the id of the object to which this wysiwyg is attached.componentId
- the id of component.
public String getWebsiteRepository()
public String[][] getWebsiteImages(String path, String componentId) throws WysiwygException
path
- type String: for example of the directorycomponentId
-
WysiwygException
public String[][] getWebsitePages(String path, String componentId) throws WysiwygException
path
- type String: for example of the directorycomponentId
-
WysiwygException
public String getOldWysiwygFileName(String objectId)
objectId:
- for example the id of the publication.
public String getWysiwygFileName(String objectId, String currentLanguage)
public String getImagesFileName(String objectId)
objectId
- : for example the id of the publication.
public void deleteFileAndAttachment(String componentId, String id)
public void deleteFile(String componentId, String objectId, String language)
public void createFileAndAttachment(String textHtml, WAPrimaryKey foreignKey, String context, String userId, String contentLanguage)
textHtml
- String : contains the text published by the wysiwyg.foreignKey
- the id of object to which is attached the wysiwyg.context
- the context images/wysiwyg....userId
- the user creating the wysiwyg.contentLanguage
- the language of the content of the wysiwyg.public void createFileAndAttachment(String textHtml, WAPrimaryKey foreignKey, String userId, String contentLanguage)
textHtml
- String : contains the text published by the wysiwygforeignKey
- the id of object to which is attached the wysiwyg.userId
- the author of the content.contentLanguage
- the language of the content.public void createUnindexedFileAndAttachment(String textHtml, WAPrimaryKey foreignKey, String userId, String contentLanguage)
textHtml
- String : contains the text published by the wysiwygforeignKey
- the id of object to which is attached the wysiwyg.userId
- the author of the content.contentLanguage
- the language of the content.public void addToIndex(FullIndexEntry indexEntry, ForeignPK pk, String language)
indexEntry
- the index of the related resource.pk
- the primary key of the container of the wysiwyg.language
- the language.public void updateFileAndAttachment(String textHtml, String componentId, String objectId, String userId, String language)
textHtml
- String : contains the text published by the wysiwygcomponentId
- String : the id of component.objectId
- String : for example the id of the publication.userId
- language
- the language of the content.public void updateFileAndAttachment(String textHtml, String componentId, String objectId, String userId, String language, boolean indexIt)
public void save(String textHtml, String componentId, String objectId, String userId, String language, boolean indexIt)
public void deleteWysiwygAttachments(String componentId, String objectId)
componentId
- String : the id of component.objectId
- String : for example the id of the publication.public void deleteWysiwygAttachmentsOnly(String spaceId, String componentId, String objectId) throws WysiwygException
spaceId
- componentId
- objectId
-
WysiwygException
public String load(String componentId, String objectId, String language)
componentId
- String : the id of component.objectId
- String : for example the id of the publication.language
- the language of the content.
public List<String> getEmbeddedAttachmentIds(String content)
content
-
public String loadFileWebsite(String path, String fileName) throws WysiwygException
fileName
- String : name of the filepath
- String : the path of the file
WysiwygException
public boolean haveGotWysiwygToDisplay(String componentId, String objectId, String language)
public boolean haveGotWysiwyg(String componentId, String objectId, String language)
public void updateWebsite(String cheminFichier, String nomFichier, String contenuFichier) throws WysiwygException
cheminFichier
- contenuFichier
- nomFichier
-
WysiwygException
protected File createFile(String cheminFichier, String nomFichier, String contenuFichier) throws WysiwygException
cheminFichier
- the path to the directory containing the file.nomFichier
- the name of the file.contenuFichier
- the content of the file.
WysiwygException
public Map<String,String> copy(String oldComponentId, String oldObjectId, String componentId, String objectId, String userId)
oldComponentId
- oldObjectId
- componentId
- objectId
- userId
-
public void move(String fromComponentId, String fromObjectId, String componentId, String objectId)
public void wysiwygPlaceHaveChanged(String oldComponentId, String oldObjectId, String newComponentId, String newObjectId)
public String getWysiwygPath(String componentId, String objectId, String language)
public String getWysiwygPath(String componentId, String objectId)
public List<ComponentInstLight> getGalleries()
public List<ComponentInstLight> getStorageFile()
public void indexEmbeddedLinkedFiles(FullIndexEntry indexEntry, List<String> embeddedAttachmentIds)
indexEntry
- index entry to updateembeddedAttachmentIds
- embedded linked files idspublic String createPath(String componentId, String context)
componentId
- : the name of componentcontext
- : string made up of the repertories separated by token ","
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |