|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stratelia.webactiv.util.FileServerUtils
public class FileServerUtils
Field Summary | |
---|---|
static String |
ARCHIVE_IT_PARAMETER
|
static String |
COMPONENT_ID_PARAMETER
|
static String |
DIR_TYPE_PARAMETER
|
static String |
DIRECTORY_PARAMETER
|
static String |
MIME_TYPE_PARAMETER
|
static String |
NODE_ID_PARAMETER
|
static String |
PUBLICATION_ID_PARAMETER
|
static String |
SIZE_PARAMETER
|
static String |
SOURCE_FILE_PARAMETER
|
static String |
TYPE_UPLOAD_PARAMETER
|
static String |
USER_ID_PARAMETER
|
Constructor Summary | |
---|---|
FileServerUtils()
|
Method Summary | |
---|---|
static String |
getAliasURL(String componentId,
String logicalName,
String attachmentId)
|
static String |
getApplicationContext()
|
static String |
getAttachmentURL(String componentId,
String logicalName,
String attachmentId,
String lang)
|
static String |
getImageURL(String originalImageURL,
String sizeParams)
Gets the URL of the specified image with the specified size. |
static Map<String,String> |
getMappedUrl(String spaceId,
String componentId,
String logicalName,
String physicalName,
String mimeType,
String subDirectory)
|
static String |
getOnlineURL(String componentId,
String logicalName,
String physicalName,
String mimeType,
String subDirectory)
|
static String |
getUrl(String componentId,
String logicalName)
|
static String |
getUrl(String logicalName,
String physicalName,
String mimeType)
|
static String |
getUrl(String componentId,
String name,
String mimeType,
String subDirectory)
|
static String |
getUrl(String componentId,
String logicalName,
String physicalName,
String mimeType,
String subDirectory)
|
static String |
getUrl(String componentId,
String userId,
String logicalName,
String physicalName,
String mimeType,
boolean archiveIt,
int pubId,
int nodeId,
String subDirectory)
|
static String |
getUrlToTempDir(String logicalName)
|
static String |
getWebUrl(String componentId,
String logicalName,
String physicalName,
String mimeType,
String subDirectory)
Return the full url to access an attachment from web site |
static String |
replaceAccentChars(String toParse)
Replace accented chars from a string. |
static String |
replaceInvalidPathChars(String toParse)
Replace chars from filename String which can't be used in a file name with '_'. |
static String |
replaceSpecialChars(String toParse)
Replace chars that have special meanings in url by their http substitute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String COMPONENT_ID_PARAMETER
public static final String SOURCE_FILE_PARAMETER
public static final String DIRECTORY_PARAMETER
public static final String ARCHIVE_IT_PARAMETER
public static final String DIR_TYPE_PARAMETER
public static final String USER_ID_PARAMETER
public static final String MIME_TYPE_PARAMETER
public static final String TYPE_UPLOAD_PARAMETER
public static final String NODE_ID_PARAMETER
public static final String PUBLICATION_ID_PARAMETER
public static final String SIZE_PARAMETER
Constructor Detail |
---|
public FileServerUtils()
Method Detail |
---|
public static String replaceSpecialChars(String toParse)
toParse
- the string which chars that have special meanings in url by their http
substitute.
public static String replaceAccentChars(String toParse)
toParse
- the string which accented chars are replaced by non-accented chars.
public static String getWebUrl(String componentId, String logicalName, String physicalName, String mimeType, String subDirectory)
componentId
- logicalName
- physicalName
- mimeType
- subDirectory
-
public static String getUrl(String componentId, String logicalName)
public static String getUrl(String componentId, String logicalName, String physicalName, String mimeType, String subDirectory)
public static String getOnlineURL(String componentId, String logicalName, String physicalName, String mimeType, String subDirectory)
public static String getAttachmentURL(String componentId, String logicalName, String attachmentId, String lang)
public static String getImageURL(String originalImageURL, String sizeParams)
originalImageURL
- the URL of the original, non-resized, image.sizeParams
- the size of the image to get. The size can be specified either a key in the
org.silverpeas.lookAndFeel.generalLook
bundle or as a dimension. The keys of the
properties indicating an image size are always prefixed by the 'image.size' term. The
dimension of an image must be in the form of WIDTHxHEIGHT with WIDTH the width in pixels of
the image and HEIGHT the height in pixels of the image. WIDTH or HEIGHT can be omitted but the
'x' character is required. If null, empty or or not well formed, the original image URL is
then returned.
public static String getAliasURL(String componentId, String logicalName, String attachmentId)
public static Map<String,String> getMappedUrl(String spaceId, String componentId, String logicalName, String physicalName, String mimeType, String subDirectory)
public static String getUrl(String componentId, String name, String mimeType, String subDirectory)
public static String getUrl(String logicalName, String physicalName, String mimeType)
public static String getUrl(String componentId, String userId, String logicalName, String physicalName, String mimeType, boolean archiveIt, int pubId, int nodeId, String subDirectory)
public static String getUrlToTempDir(String logicalName)
public static String replaceInvalidPathChars(String toParse)
toParse
- the name of the file.
public static String getApplicationContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |