public void addParameter(String key, Serializable value)
allows additional parameters to be added as settings to modify the behavior of the session.
Settings provide session configuration parameters, including cache settings, default paging
values, custom Authentication Providers, and ordering.
Parameters
- String key
- A String representing the session parameters (see SessionSettings).
- Serializable value
- Value of the specified setting.
Returns
void
Example
... // Create the repository Session. // SkyVault_CMIS_ATOMPUB_URL = "http://cmis.alfresco.com/cmisatom"; RepositorySession session = new RepositorySession(ALFRESCO_CMIS_ATOMPUB_URL); // Check the Repository Session object has been created but not bind // with the repository so there's no RepositoryInfo Assert.assertNotNull(session); Assert.assertNull(session.getRepositoryInfo()); // Add Extra Informations // Because cmis.alfresco.com doesn't respect the pattern of SkyVault // cmis binding url we add as extra parameters session.addParameter(SessionSettings.BINDING_URL, SkyVault_CMIS_ATOMPUB_URL); // Start the authentication and get all informations from the // repository session.authenticate(ALFRESCO_CMIS_USER, SkyVault_CMIS_PASSWORD); // Check informations has been collected from repository Assert.assertNotNull(session); Assert.assertNotNull(session.getRepositoryInfo()); // Base Url Assert.assertNotNull(session.getBaseUrl()); Assert.assertEquals(ALFRESCO_CMIS_ATOMPUB_URL, session.getBaseUrl()); ...