com.stratelia.silverpeas.peasCore
Class URLManager

java.lang.Object
  extended by com.stratelia.silverpeas.peasCore.URLManager

public class URLManager
extends Object

Class declaration

Author:
t.leroi

Nested Class Summary
static class URLManager.Permalink
           
 
Field Summary
static String CMP_ADMIN
           
static String CMP_AGENDA
           
static String CMP_ALERTUSERPEAS
           
static String CMP_ATTACHMENT
           
static String CMP_CLIPBOARD
           
static String CMP_COMMUNICATIONUSER
           
static String CMP_EXPERTLOCATORPEAS
           
static String CMP_FILESERVER
           
static String CMP_FILESHARING
           
static String CMP_FORMDESIGNER
           
static String CMP_GENERICPANELPEAS
           
static String CMP_INFOLETTER
           
static String CMP_INTERESTCENTERPEAS
           
static String CMP_JOBBACKUP
           
static String CMP_JOBDOMAINPEAS
           
static String CMP_JOBMANAGERPEAS
           
static String CMP_JOBORGANIZATIONPEAS
           
static String CMP_JOBREPORTPEAS
           
static String CMP_JOBSEARCHPEAS
           
static String CMP_JOBSTARTPAGEPEAS
           
static String CMP_JOBTOOLSPEAS
           
static String CMP_MYLINKSPEAS
           
static String CMP_MYPROFILE
           
static String CMP_NOTIFICATIONUSER
           
static String CMP_PDC
           
static String CMP_PDCSUBSCRIPTION
           
static String CMP_PERSONALIZATION
           
static String CMP_POPUP
           
static String CMP_PORTLET
           
static String CMP_SCHEDULE_EVENT
           
static String CMP_SEARCHENGINE
           
static String CMP_SELECTIONPEAS
           
static String CMP_SILVERMAIL
           
static String CMP_SILVERSTATISTICSPEAS
           
static String CMP_TEMPLATEDESIGNER
           
static String CMP_THESAURUS
           
static String CMP_TODO
           
static String CMP_TREEVIEW
           
static String CMP_VERSIONINGPEAS
           
static String CMP_VSICPUZZLE
           
static String CMP_WEBCONNECTIONS
           
static String CMP_WEBLOADERPEAS
           
static String CMP_WHITEPAGESPEAS
           
static String CMP_WORKFLOW
           
static String CMP_WYSIWYG
           
static int URL_COMPONENT
           
static int URL_DOCUMENT
           
static int URL_FILE
           
static int URL_MEDIA
           
static int URL_MESSAGE
           
static int URL_PUBLI
           
static int URL_QUESTION
           
static int URL_SPACE
           
static int URL_SURVEY
           
static int URL_TOPIC
           
static int URL_VERSION
           
 
Constructor Summary
URLManager()
           
 
Method Summary
static String appendVersion(String url)
           
static boolean displayUniversalLinks()
           
static String encodeURL(String url)
          Translates a string into application/x-www-form-urlencoded format using a specific encoding scheme.
static String getApplicationURL()
          Returns The Application web context.
static String getComponentInstanceURL(String sComponentId)
           
static String getComponentNameFromComponentId(String sClientComponentId)
          Returns kmelia for parameter kmelia23
static String getCurrentServerURL()
           
static String getFullApplicationURL(javax.servlet.http.HttpServletRequest request)
           
static String getHttpMode()
           
static String getNewComponentURL(String spaceId, String componentId)
          Retourne l'URL pour les nouveaux composants lors de la recherche globale
static String getPermalink(URLManager.Permalink permalink, String resourceId)
          Gets the permalink according to the specified parameters.
static String getSearchResultURL(SilverpeasContent content)
           
static String getServerURL(javax.servlet.http.HttpServletRequest request)
           
static String getSilverpeasVersion()
           
static String getSilverpeasVersionMinify()
           
static String getSimpleURL(int type, String id)
           
static String getSimpleURL(int type, String id, boolean appendContext)
           
static String getSimpleURL(int type, String id, String componentId)
           
static String getSimpleURL(int type, String id, String componentId, boolean appendContext)
           
static String getSimpleURL(int type, String id, String componentId, boolean appendContext, String forumId)
           
static String getURL(String sComponentName)
          Deprecated. 
static String getURL(String sSpace, String sComponentId)
           
static String getURL(String sComponentName, String sSpace, String sComponentId)
           
static boolean isPermalink(String url)
           
static void setCurrentServerUrl(javax.servlet.http.HttpServletRequest request)
           
static void setSilverpeasVersion(String version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CMP_ADMIN

public static final String CMP_ADMIN
See Also:
Constant Field Values

CMP_AGENDA

public static final String CMP_AGENDA
See Also:
Constant Field Values

CMP_ATTACHMENT

public static final String CMP_ATTACHMENT
See Also:
Constant Field Values

CMP_FORMDESIGNER

public static final String CMP_FORMDESIGNER
See Also:
Constant Field Values

CMP_SILVERMAIL

public static final String CMP_SILVERMAIL
See Also:
Constant Field Values

CMP_POPUP

public static final String CMP_POPUP
See Also:
Constant Field Values

CMP_PERSONALIZATION

public static final String CMP_PERSONALIZATION
See Also:
Constant Field Values

CMP_FILESERVER

public static final String CMP_FILESERVER
See Also:
Constant Field Values

CMP_PORTLET

public static final String CMP_PORTLET
See Also:
Constant Field Values

CMP_TODO

public static final String CMP_TODO
See Also:
Constant Field Values

CMP_TREEVIEW

public static final String CMP_TREEVIEW
See Also:
Constant Field Values

CMP_WORKFLOW

public static final String CMP_WORKFLOW
See Also:
Constant Field Values

CMP_WYSIWYG

public static final String CMP_WYSIWYG
See Also:
Constant Field Values

CMP_SCHEDULE_EVENT

public static final String CMP_SCHEDULE_EVENT
See Also:
Constant Field Values

CMP_CLIPBOARD

public static final String CMP_CLIPBOARD
See Also:
Constant Field Values

CMP_NOTIFICATIONUSER

public static final String CMP_NOTIFICATIONUSER
See Also:
Constant Field Values

CMP_COMMUNICATIONUSER

public static final String CMP_COMMUNICATIONUSER
See Also:
Constant Field Values

CMP_SEARCHENGINE

public static final String CMP_SEARCHENGINE
See Also:
Constant Field Values

CMP_WEBLOADERPEAS

public static final String CMP_WEBLOADERPEAS
See Also:
Constant Field Values

CMP_JOBMANAGERPEAS

public static final String CMP_JOBMANAGERPEAS
See Also:
Constant Field Values

CMP_JOBDOMAINPEAS

public static final String CMP_JOBDOMAINPEAS
See Also:
Constant Field Values

CMP_JOBSTARTPAGEPEAS

public static final String CMP_JOBSTARTPAGEPEAS
See Also:
Constant Field Values

CMP_JOBORGANIZATIONPEAS

public static final String CMP_JOBORGANIZATIONPEAS
See Also:
Constant Field Values

CMP_JOBSEARCHPEAS

public static final String CMP_JOBSEARCHPEAS
See Also:
Constant Field Values

CMP_JOBREPORTPEAS

public static final String CMP_JOBREPORTPEAS
See Also:
Constant Field Values

CMP_JOBTOOLSPEAS

public static final String CMP_JOBTOOLSPEAS
See Also:
Constant Field Values

CMP_SELECTIONPEAS

public static final String CMP_SELECTIONPEAS
See Also:
Constant Field Values

CMP_ALERTUSERPEAS

public static final String CMP_ALERTUSERPEAS
See Also:
Constant Field Values

CMP_GENERICPANELPEAS

public static final String CMP_GENERICPANELPEAS
See Also:
Constant Field Values

CMP_SILVERSTATISTICSPEAS

public static final String CMP_SILVERSTATISTICSPEAS
See Also:
Constant Field Values

CMP_PDC

public static final String CMP_PDC
See Also:
Constant Field Values

CMP_THESAURUS

public static final String CMP_THESAURUS
See Also:
Constant Field Values

CMP_INTERESTCENTERPEAS

public static final String CMP_INTERESTCENTERPEAS
See Also:
Constant Field Values

CMP_MYLINKSPEAS

public static final String CMP_MYLINKSPEAS
See Also:
Constant Field Values

CMP_PDCSUBSCRIPTION

public static final String CMP_PDCSUBSCRIPTION
See Also:
Constant Field Values

CMP_VERSIONINGPEAS

public static final String CMP_VERSIONINGPEAS
See Also:
Constant Field Values

CMP_FILESHARING

public static final String CMP_FILESHARING
See Also:
Constant Field Values

CMP_WEBCONNECTIONS

public static final String CMP_WEBCONNECTIONS
See Also:
Constant Field Values

CMP_EXPERTLOCATORPEAS

public static final String CMP_EXPERTLOCATORPEAS
See Also:
Constant Field Values

CMP_WHITEPAGESPEAS

public static final String CMP_WHITEPAGESPEAS
See Also:
Constant Field Values

CMP_VSICPUZZLE

public static final String CMP_VSICPUZZLE
See Also:
Constant Field Values

CMP_INFOLETTER

public static final String CMP_INFOLETTER
See Also:
Constant Field Values

CMP_JOBBACKUP

public static final String CMP_JOBBACKUP
See Also:
Constant Field Values

CMP_TEMPLATEDESIGNER

public static final String CMP_TEMPLATEDESIGNER
See Also:
Constant Field Values

CMP_MYPROFILE

public static final String CMP_MYPROFILE
See Also:
Constant Field Values

URL_SPACE

public static final int URL_SPACE
See Also:
Constant Field Values

URL_COMPONENT

public static final int URL_COMPONENT
See Also:
Constant Field Values

URL_PUBLI

public static final int URL_PUBLI
See Also:
Constant Field Values

URL_TOPIC

public static final int URL_TOPIC
See Also:
Constant Field Values

URL_FILE

public static final int URL_FILE
See Also:
Constant Field Values

URL_SURVEY

public static final int URL_SURVEY
See Also:
Constant Field Values

URL_QUESTION

public static final int URL_QUESTION
See Also:
Constant Field Values

URL_MESSAGE

public static final int URL_MESSAGE
See Also:
Constant Field Values

URL_DOCUMENT

public static final int URL_DOCUMENT
See Also:
Constant Field Values

URL_VERSION

public static final int URL_VERSION
See Also:
Constant Field Values

URL_MEDIA

public static final int URL_MEDIA
See Also:
Constant Field Values
Constructor Detail

URLManager

public URLManager()
Method Detail

getURL

public static String getURL(String sComponentName,
                            String sSpace,
                            String sComponentId)
Parameters:
sComponentName - - the componentName (ie kmelia, bookmark...)
sSpace - - the space id
sComponentId - - the componentId (ie kmelia12, bookmark578...)
Returns:
an String like '/RcomponentName/componentId/'

getURL

@Deprecated
public static String getURL(String sComponentName)
Deprecated. 


getComponentInstanceURL

public static String getComponentInstanceURL(String sComponentId)

getURL

public static String getURL(String sSpace,
                            String sComponentId)

getNewComponentURL

public static String getNewComponentURL(String spaceId,
                                        String componentId)
Retourne l'URL pour les nouveaux composants lors de la recherche globale

Parameters:
spaceId - - l'id de l'espace (WA151)
componentId - - l'id de l'instance de composant (trucsAstuces1042)
Returns:
la nouvelle URL

getComponentNameFromComponentId

public static String getComponentNameFromComponentId(String sClientComponentId)
Returns kmelia for parameter kmelia23

Parameters:
sClientComponentId -
Returns:

getApplicationURL

public static String getApplicationURL()
Returns The Application web context.

Returns:
The Application web context.

getFullApplicationURL

public static String getFullApplicationURL(javax.servlet.http.HttpServletRequest request)

setCurrentServerUrl

public static void setCurrentServerUrl(javax.servlet.http.HttpServletRequest request)

getCurrentServerURL

public static String getCurrentServerURL()

getServerURL

public static String getServerURL(javax.servlet.http.HttpServletRequest request)

getHttpMode

public static String getHttpMode()

displayUniversalLinks

public static boolean displayUniversalLinks()
Returns:

getSimpleURL

public static String getSimpleURL(int type,
                                  String id,
                                  String componentId)

getSimpleURL

public static String getSimpleURL(int type,
                                  String id,
                                  String componentId,
                                  boolean appendContext,
                                  String forumId)

getSimpleURL

public static String getSimpleURL(int type,
                                  String id,
                                  String componentId,
                                  boolean appendContext)

getSimpleURL

public static String getSimpleURL(int type,
                                  String id)

getSimpleURL

public static String getSimpleURL(int type,
                                  String id,
                                  boolean appendContext)

getSearchResultURL

public static String getSearchResultURL(SilverpeasContent content)

encodeURL

public static String encodeURL(String url)
Translates a string into application/x-www-form-urlencoded format using a specific encoding scheme. The specified string is expected to be in the UTF-8 charset, otherwise it is returned as such.

Parameters:
url - an UTF-8 string representing an URL of a resource in Silverpeas.
Returns:
the encoded URL.

getPermalink

public static String getPermalink(URLManager.Permalink permalink,
                                  String resourceId)
Gets the permalink according to the specified parameters.

Parameters:
permalink - the permalink type.
resourceId - the identifier of the resource.
Returns:
the permalink string.

isPermalink

public static boolean isPermalink(String url)

setSilverpeasVersion

public static void setSilverpeasVersion(String version)

getSilverpeasVersion

public static String getSilverpeasVersion()

getSilverpeasVersionMinify

public static String getSilverpeasVersionMinify()

appendVersion

public static String appendVersion(String url)


Copyright © 2016 Silverpeas. All Rights Reserved.