|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.wysiwyg.control.WysiwygController
public class WysiwygController
Central service to manage Wysiwyg.
Field Summary | |
---|---|
static String |
WYSIWYG_CONTEXT
|
static String |
WYSIWYG_IMAGES
|
static String |
WYSIWYG_WEBSITES
|
Constructor Summary | |
---|---|
protected |
WysiwygController()
|
Method Summary | |
---|---|
static void |
addToIndex(FullIndexEntry indexEntry,
ForeignPK pk,
String language)
Add all elements attached to object identified by the given index into the given index |
static Map<String,String> |
copy(String oldComponentId,
String oldObjectId,
String componentId,
String objectId,
String userId)
Method declaration |
static void |
createFileAndAttachment(String textHtml,
WAPrimaryKey foreignKey,
String userId,
String contentLanguage)
Method declaration creation of the file and its attachment. |
static void |
createFileAndAttachment(String textHtml,
WAPrimaryKey foreignKey,
String context,
String userId,
String contentLanguage)
Creation of the file and its attachment. |
static String |
createPath(String componentId,
String context)
To create path. |
static void |
createUnindexedFileAndAttachment(String textHtml,
WAPrimaryKey foreignKey,
String userId,
String contentLanguage)
Method declaration creation of the file and its attachment. |
static void |
deleteFile(String componentId,
String objectId,
String language)
|
static void |
deleteFileAndAttachment(String componentId,
String id)
|
static void |
deleteWysiwygAttachments(String componentId,
String objectId)
Method declaration remove the file attached. |
static 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 |
static List<String> |
getEmbeddedAttachmentIds(String content)
Get all Silverpeas Files linked by wysiwyg content |
static List<ComponentInstLight> |
getGalleries()
|
static List<SimpleDocument> |
getImages(String id,
String componentId)
Turn over all the images attached according to the parameters id, componentId. |
static String |
getImagesFileName(String objectId)
Method declaration built the name of the images to be attached. |
static WysiwygController |
getInstance()
|
protected WysiwygManager |
getManager()
Gets the manager. |
static String |
getOldWysiwygFileName(String objectId)
Build the name of the file to be attached. |
static List<ComponentInstLight> |
getStorageFile()
Gets the components dedicated to file storage |
static String[][] |
getWebsiteImages(String path,
String componentId)
Get images of the website. |
static String[][] |
getWebsitePages(String path,
String componentId)
Method declaration Get html pages of the website |
static String |
getWebsiteRepository()
|
static String |
getWysiwygFileName(String objectId,
String currentLanguage)
|
static String |
getWysiwygPath(String componentId,
String objectId)
|
static String |
getWysiwygPath(String componentId,
String objectId,
String language)
|
static boolean |
haveGotWysiwyg(String componentId,
String objectId,
String language)
|
static boolean |
haveGotWysiwygToDisplay(String componentId,
String objectId,
String language)
|
static void |
indexEmbeddedLinkedFiles(FullIndexEntry indexEntry,
List<String> embeddedAttachmentIds)
Index given embedded linked files |
static String |
load(String componentId,
String objectId,
String language)
Loads wysiwyg content. |
static String |
loadFileWebsite(String path,
String fileName)
Method declaration return the contents of the file. |
static String |
loadForReadOnly(String componentId,
String objectId,
String language)
Loads wysiwyg content that will only be read and never updated. |
static void |
move(String fromComponentId,
String fromObjectId,
String componentId,
String objectId)
|
static void |
save(String textHtml,
String componentId,
String objectId,
String userId,
String language,
boolean indexIt)
|
static void |
updateFileAndAttachment(String textHtml,
String componentId,
String objectId,
String userId,
String language)
Method declaration remove and recreates the file attached |
static void |
updateFileAndAttachment(String textHtml,
String componentId,
String objectId,
String userId,
String language,
boolean indexIt)
|
static 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 : " |
static 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 WysiwygController()
Method Detail |
---|
protected WysiwygManager getManager()
public static WysiwygController getInstance()
public static 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 static String getWebsiteRepository()
public static String[][] getWebsiteImages(String path, String componentId) throws WysiwygException
path
- type String: for example of the directorycomponentId
-
WysiwygException
public static String[][] getWebsitePages(String path, String componentId) throws WysiwygException
path
- type String: for example of the directorycomponentId
-
WysiwygException
public static String getOldWysiwygFileName(String objectId)
objectId:
- for example the id of the publication.
public static String getWysiwygFileName(String objectId, String currentLanguage)
public static String getImagesFileName(String objectId)
objectId
- : for example the id of the publication.
public static void deleteFileAndAttachment(String componentId, String id)
public static void deleteFile(String componentId, String objectId, String language)
public static 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 static 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 static 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 static 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 static 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 static void updateFileAndAttachment(String textHtml, String componentId, String objectId, String userId, String language, boolean indexIt)
public static void save(String textHtml, String componentId, String objectId, String userId, String language, boolean indexIt)
public static void deleteWysiwygAttachments(String componentId, String objectId)
componentId
- String : the id of component.objectId
- String : for example the id of the publication.public static void deleteWysiwygAttachmentsOnly(String spaceId, String componentId, String objectId) throws WysiwygException
spaceId
- componentId
- objectId
-
WysiwygException
public static 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 static String loadForReadOnly(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 static List<String> getEmbeddedAttachmentIds(String content)
content
-
public static String loadFileWebsite(String path, String fileName) throws WysiwygException
fileName
- String : name of the filepath
- String : the path of the file
WysiwygException
public static boolean haveGotWysiwygToDisplay(String componentId, String objectId, String language)
public static boolean haveGotWysiwyg(String componentId, String objectId, String language)
public static void updateWebsite(String cheminFichier, String nomFichier, String contenuFichier) throws WysiwygException
cheminFichier
- contenuFichier
- nomFichier
-
WysiwygException
public static Map<String,String> copy(String oldComponentId, String oldObjectId, String componentId, String objectId, String userId)
oldComponentId
- oldObjectId
- componentId
- objectId
- userId
-
public static void move(String fromComponentId, String fromObjectId, String componentId, String objectId)
public static void wysiwygPlaceHaveChanged(String oldComponentId, String oldObjectId, String newComponentId, String newObjectId)
public static String getWysiwygPath(String componentId, String objectId, String language)
public static String getWysiwygPath(String componentId, String objectId)
public static List<ComponentInstLight> getGalleries()
public static List<ComponentInstLight> getStorageFile()
public static void indexEmbeddedLinkedFiles(FullIndexEntry indexEntry, List<String> embeddedAttachmentIds)
indexEntry
- index entry to updateembeddedAttachmentIds
- embedded linked files idspublic static 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 |