com.silverpeas.bundle.web
Class BundleResourceTest

java.lang.Object
  extended by com.sun.jersey.test.framework.JerseyTest
      extended by com.silverpeas.web.RESTWebServiceTest<T>
          extended by com.silverpeas.web.ResourceGettingTest<BundleTestResources>
              extended by com.silverpeas.bundle.web.BundleResourceTest
All Implemented Interfaces:
WebResourceTesting

public class BundleResourceTest
extends ResourceGettingTest<BundleTestResources>

The bundle resource represents in the WEB a localized bundle of messages. This WEB service is an entry point to access the different bundles in use in Silverpeas. It can be accessed only by authenticated users. Ony the localized texts can be actually accessed, no settings. The localized bundled is refered in the URI by its absolute classpath location and only the one that matches the prefered language of the current user in the session is taken into account. If no bunble exists in the language of the current user, then the default one is sent back.


Field Summary
 
Fields inherited from class com.silverpeas.web.RESTWebServiceTest
CONTEXT_NAME
 
Fields inherited from interface com.silverpeas.web.WebResourceTesting
HTTP_SESSIONKEY
 
Constructor Summary
BundleResourceTest()
           
 
Method Summary
 String anUnexistingResourceURI()
           
 String aOrgResourceURI()
           
 String aResource()
           
 String aResourceURI()
           
 String aSettingsResourceURI()
           
 void getAComponentSettings()
           
 void getAComponentSettingsInPlaceOfLocalizedBundle()
           
 void getAnExistingBundleByItsNameAndExtension()
           
 void getAnExistingBundleExplicitlyInEnglish()
           
 void getAnExistingBundleInEnglish()
           
 void getAnExistingBundleInFrench()
           
 String[] getExistingComponentInstances()
           
 String getSessionKey()
           
 void gettingAnUnexistingResource()
           
 void gettingAResourceByANonAuthenticatedUser()
           
 void gettingAResourceByAnUnauthorizedUser()
           
 void gettingAResourceWithAnExpiredSession()
           
 Class<String> getWebEntityClass()
           
 void prepareTestResources()
           
 
Methods inherited from class com.silverpeas.web.ResourceGettingTest
asMediaType, getAt, getAt, withAsSessionKey
 
Methods inherited from class com.silverpeas.web.RESTWebServiceTest
addComponentInstance, addTool, aUser, authenticate, buildQueryParametersFrom, denieAuthorizationToUsers, denieSpaceAuthorizationToUsers, getAccessControllerMock, getExistingTools, getMockedSpaceAccessController, getOrganizationControllerMock, getPersonalizationServiceMock, getTestResources, prepareMockedResources, resource, setComponentAccessibilityToUser
 
Methods inherited from class com.sun.jersey.test.framework.JerseyTest
client, configure, getBaseURI, getClient, getClientFactory, getPort, getTestContainerFactory, setClientFactory, setTestContainerFactory, setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleResourceTest

public BundleResourceTest()
Method Detail

prepareTestResources

public void prepareTestResources()

gettingAResourceByANonAuthenticatedUser

public void gettingAResourceByANonAuthenticatedUser()
Overrides:
gettingAResourceByANonAuthenticatedUser in class ResourceGettingTest<BundleTestResources>

gettingAResourceWithAnExpiredSession

public void gettingAResourceWithAnExpiredSession()
Overrides:
gettingAResourceWithAnExpiredSession in class ResourceGettingTest<BundleTestResources>

gettingAResourceByAnUnauthorizedUser

public void gettingAResourceByAnUnauthorizedUser()
Overrides:
gettingAResourceByAnUnauthorizedUser in class ResourceGettingTest<BundleTestResources>

gettingAnUnexistingResource

public void gettingAnUnexistingResource()
Overrides:
gettingAnUnexistingResource in class ResourceGettingTest<BundleTestResources>

getAnExistingBundleInFrench

public void getAnExistingBundleInFrench()

getAnExistingBundleByItsNameAndExtension

public void getAnExistingBundleByItsNameAndExtension()

getAnExistingBundleInEnglish

public void getAnExistingBundleInEnglish()

getAnExistingBundleExplicitlyInEnglish

public void getAnExistingBundleExplicitlyInEnglish()

getAComponentSettingsInPlaceOfLocalizedBundle

public void getAComponentSettingsInPlaceOfLocalizedBundle()

getAComponentSettings

public void getAComponentSettings()

getExistingComponentInstances

public String[] getExistingComponentInstances()
Specified by:
getExistingComponentInstances in class RESTWebServiceTest<BundleTestResources>

aResourceURI

public String aResourceURI()

aOrgResourceURI

public String aOrgResourceURI()

aSettingsResourceURI

public String aSettingsResourceURI()

anUnexistingResourceURI

public String anUnexistingResourceURI()

aResource

public String aResource()

getSessionKey

public String getSessionKey()

getWebEntityClass

public Class<String> getWebEntityClass()


Copyright © 2016 Silverpeas. All Rights Reserved.