|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.silverpeas.web.TestResources
com.silverpeas.pdc.web.PdcTestResources
@Named(value="testRESTResources") public class PdcTestResources
Resources required by the unit tests on the PdC web resources. It manages all of the resources required by the tests.
| Field Summary | |
|---|---|
static String |
JAVA_PACKAGE
Java package in which are defined the web resources and their representation (web entities). |
static String |
SPRING_CONTEXT
The IoC context within which the tests should be ran. |
| Fields inherited from class com.silverpeas.web.TestResources |
|---|
DEFAULT_DOMAIN, DEFAULT_LANGUAGE, TEST_RESOURCES_NAME, USER_ID_IN_TEST |
| Constructor Summary | |
|---|---|
PdcTestResources()
|
|
| Method Summary | |
|---|---|
UserThesaurusHolder |
aThesaurusHolderFor(UserDetail user)
Gets a holder of thesaurus for the specified user. |
void |
enableThesaurus()
Enables the thesaurus for the users used in the tests. |
List<Axis> |
getAxisInPdC()
|
List<UsedAxis> |
getAxisUsedInClassification()
|
ContentManager |
getContentManager()
Gets the manager of resource's content used in tests. |
OrganisationController |
getOrganisationController()
Gets the organisation controller used in tests. |
PdcClassification |
getPdcClassification()
Gets the current PdC classification used in the test. |
PdcClassificationService |
getPdcClassificationServiceMock()
|
PdcBm |
getPdcService()
Gets the PdC business service used in tests. |
PdcClassification |
getPredefinedClassification(String nodeId,
String componentId)
|
void |
save(PdcClassification classification)
Saves the specified PdC classification in the current test context. |
void |
savePredefined(PdcClassification classification)
Uses the pre-registered behaviour of the mock for the predefined classification saving. |
String |
toJSON(PdcClassificationEntity classification)
|
PdcClassificationEntity |
toWebEntity(PdcClassification classification,
UserDetail forUser)
Converts the specified classification of a resource on the PdC to its web representation (web entity). |
| Methods inherited from class com.silverpeas.web.TestResources |
|---|
aUser, aUserNamed, getAccessControllerMock, getApplicationContext, getOrganizationControllerMock, getPersonalizationServiceMock, getSessionManagerMock, getSpaceAccessControllerMock, getTestResources, getTokenServiceMock, registerUser, setApplicationContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String JAVA_PACKAGE
public static final String SPRING_CONTEXT
| Constructor Detail |
|---|
public PdcTestResources()
| Method Detail |
|---|
public PdcBm getPdcService()
public ContentManager getContentManager()
public OrganisationController getOrganisationController()
public UserThesaurusHolder aThesaurusHolderFor(UserDetail user)
user - the user for which a thesaurus holder should be get.
public void save(PdcClassification classification)
classification - the classification on which the test will work.public void savePredefined(PdcClassification classification)
classification - the classification to save.
public PdcClassification getPredefinedClassification(String nodeId,
String componentId)
public PdcClassification getPdcClassification()
public List<UsedAxis> getAxisUsedInClassification()
public List<Axis> getAxisInPdC()
public PdcClassificationEntity toWebEntity(PdcClassification classification,
UserDetail forUser)
throws ThesaurusException
classification - the PdC classification of a resource.forUser - for whom user the web entity should be built.
ThesaurusException - if an error olean ccurs while settings the synonyms.public String toJSON(PdcClassificationEntity classification)
public void enableThesaurus()
public PdcClassificationService getPdcClassificationServiceMock()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||