Java Code Examples for org.apache.chemistry.opencmis.commons.enums.BindingType#ATOMPUB
The following examples show how to use
org.apache.chemistry.opencmis.commons.enums.BindingType#ATOMPUB .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestPublicApiAtomPub11TCK.java From alfresco-remote-api with GNU Lesser General Public License v3.0 | 6 votes |
@Before public void before() throws Exception { // see REPO-1524 // the tests are always run on PostgreSQL only // Dialect dialect = (Dialect) applicationContext.getBean("dialect"); // assumeFalse(dialect instanceof Oracle9Dialect); int port = getTestFixture().getJettyComponent().getPort(); TestNetwork network = getTestFixture().getRandomNetwork(); Map<String, String> cmisParameters = new HashMap<String, String>(); cmisParameters.put(TestParameters.DEFAULT_RELATIONSHIP_TYPE, "R:cm:replaces"); cmisParameters.put(TestParameters.DEFAULT_SECONDARY_TYPE, "P:cm:author"); cmisParameters.put(TestParameters.DEFAULT_ITEM_TYPE, "I:cm:cmobject"); clientContext = new OpenCMISClientContext(BindingType.ATOMPUB, MessageFormat.format(CMIS_URL, "localhost", String.valueOf(port), "alfresco", network.getId(), "public"), "admin@" + network.getId(), "admin", cmisParameters, getTestFixture().getJettyComponent().getApplicationContext()); overrideVersionableAspectProperties(getTestFixture().getJettyComponent().getApplicationContext()); }
Example 2
Source File: TestPublicApiAtomPub10TCK.java From alfresco-remote-api with GNU Lesser General Public License v3.0 | 6 votes |
@Before public void before() throws Exception { // see REPO-1524 // the tests are always run on PostgreSQL only // Dialect dialect = (Dialect) applicationContext.getBean("dialect"); // assumeFalse(dialect instanceof Oracle9Dialect); int port = getTestFixture().getJettyComponent().getPort(); TestNetwork network = getTestFixture().getRandomNetwork(); Map<String, String> cmisParameters = new HashMap<String, String>(); cmisParameters.put(TestParameters.DEFAULT_RELATIONSHIP_TYPE, "R:cm:replaces"); clientContext = new OpenCMISClientContext(BindingType.ATOMPUB, MessageFormat.format(CMIS_URL, "localhost", String.valueOf(port), "alfresco", network.getId(), "public"), "admin@" + network.getId(), "admin", cmisParameters, getTestFixture().getJettyComponent().getApplicationContext()); overrideVersionableAspectProperties(getTestFixture().getJettyComponent().getApplicationContext()); }
Example 3
Source File: CMISDispatcherRegistry.java From alfresco-remote-api with GNU Lesser General Public License v3.0 | 5 votes |
public BindingType getOpenCmisBinding() { BindingType bindingType = null; if(this == atom) { bindingType = BindingType.ATOMPUB; } else if(this == browser) { bindingType = BindingType.BROWSER; } return bindingType; }
Example 4
Source File: TestEnterpriseAtomPubTCK.java From alfresco-remote-api with GNU Lesser General Public License v3.0 | 5 votes |
@Before public void setup() throws Exception { JettyComponent jetty = getTestFixture().getJettyComponent(); final SearchService searchService = (SearchService)jetty.getApplicationContext().getBean("searchService");; final NodeService nodeService = (NodeService)jetty.getApplicationContext().getBean("nodeService"); final FileFolderService fileFolderService = (FileFolderService)jetty.getApplicationContext().getBean("fileFolderService"); final NamespaceService namespaceService = (NamespaceService)jetty.getApplicationContext().getBean("namespaceService"); final TransactionService transactionService = (TransactionService)jetty.getApplicationContext().getBean("transactionService"); final String name = "abc" + System.currentTimeMillis(); transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback<Void>() { @Override public Void execute() throws Throwable { AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName()); Repository repositoryHelper = (Repository)jetty.getApplicationContext().getBean("repositoryHelper"); NodeRef companyHome = repositoryHelper.getCompanyHome(); fileFolderService.create(companyHome, name, ContentModel.TYPE_FOLDER).getNodeRef(); return null; } }, false, true); int port = jetty.getPort(); Map<String, String> cmisParameters = new HashMap<String, String>(); cmisParameters.put(TestParameters.DEFAULT_RELATIONSHIP_TYPE, "R:cm:replaces"); cmisParameters.put(TestParameters.DEFAULT_TEST_FOLDER_PARENT, "/" + name); clientContext = new OpenCMISClientContext(BindingType.ATOMPUB, MessageFormat.format(CMIS_URL, "localhost", String.valueOf(port), "alfresco"), "admin", "admin", cmisParameters, jetty.getApplicationContext()); overrideVersionableAspectProperties(jetty.getApplicationContext()); }