Examples of CmsObject


Examples of org.apache.jetspeed.om.cms.CmsObject

     * @return Resource a new created cmsManager.
     */
    public static CmsObject getCmsOmInstance(String CmsOmName)
         throws JetspeedCMSException
    {
        CmsObject cmsObject = null;
        Class omClass = (Class) omClasses.get(CmsOmName);
       
        if (null == omClass)
        {
            try
View Full Code Here

Examples of org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject

        offlineAccess.getNodeByPath("/", new Object());
    }

    @Test
    public void testGetNodeById() throws RepositoryAccessException {
        CMSObject expected = (CMSObject) repository.get(0);
        List<CMSObject> real = offlineAccess.getNodeById(expected.getUniqueRef(), null);

        assertEquals(1, real.size());
        assertSame(expected, real.get(0));

        expectedException.expect(RepositoryAccessException.class);
View Full Code Here

Examples of org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject

    }

    @Test
    public void testGetNodeByName() throws RepositoryAccessException {
        CMSObject c11 = (CMSObject) repository.get(1);
        CMSObject c13 = (CMSObject) repository.get(3);

        List<CMSObject> real = offlineAccess.getNodeByName(c11.getLocalname(), null);
        assertEquals(2, real.size());
        assertSame(c11, real.get(0));
        assertSame(c13, real.get(1));
View Full Code Here

Examples of org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject

        offlineAccess.getNodeByName(UUID.randomUUID().toString(), new Object());
    }

    @Test
    public void testGetFirstNodeByPath() throws RepositoryAccessException {
        CMSObject real = offlineAccess.getFirstNodeByPath("/", null);
        // Check only the root is returned
        assertSame(repository.get(0), real);

        CMSObject all = offlineAccess.getFirstNodeByPath("/%", null);
        assertNotNull(all);

        expectedException.expect(IllegalArgumentException.class);
        offlineAccess.getFirstNodeByPath("/", new Object());
    }
View Full Code Here

Examples of org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject

        offlineAccess.getFirstNodeByPath("/", new Object());
    }

    @Test
    public void testGetFirstNodeById() throws RepositoryAccessException {
        CMSObject expected = (CMSObject) repository.get(0);
        CMSObject real = offlineAccess.getFirstNodeById(expected.getUniqueRef(), null);

        assertSame(expected, real);

        expectedException.expect(RepositoryAccessException.class);
        real = offlineAccess.getFirstNodeById(UUID.randomUUID().toString(), null);
View Full Code Here

Examples of org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject

    }

    @Test
    public void testGetFirstNodeByName() throws RepositoryAccessException {
        CMSObject c11 = (CMSObject) repository.get(1);
        CMSObject c13 = (CMSObject) repository.get(3);

        CMSObject real = offlineAccess.getFirstNodeByName(c11.getLocalname(), null);
        assertTrue(c11 == real || c13 == real);

        expectedException.expect(IllegalArgumentException.class);
        offlineAccess.getNodeByName(UUID.randomUUID().toString(), new Object());
    }
View Full Code Here

Examples of org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject

        offlineAccess.getNodeByName(UUID.randomUUID().toString(), new Object());
    }

    @Test
    public void testGetObjectTypeDefinition() throws RepositoryAccessException {
        CMSObject root = (CMSObject) repository.get(0);
        ObjectTypeDefinition expected = (ObjectTypeDefinition) repository.get(5);
        ObjectTypeDefinition typeDef = offlineAccess.getObjectTypeDefinition(root.getObjectTypeRef(), null);
        assertSame(expected, typeDef);

        expectedException.expect(IllegalArgumentException.class);
        offlineAccess.getObjectTypeDefinition(UUID.randomUUID().toString(), new Object());
View Full Code Here

Examples of org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject

     *
     * @Test public void testGetAllowableTypeDef() {}
     */
    @Test
    public void testGetContainerObject() throws RepositoryAccessException {
        CMSObject root = (CMSObject) repository.get(0);
        Property p = root.getProperty().get(0);
        CMSObject real = offlineAccess.getContainerObject(p, null);
        assertSame(root, real);

        expectedException.expect(IllegalArgumentException.class);
        offlineAccess.getContainerObject(p, new Object());
    }
View Full Code Here

Examples of org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject

        offlineAccess.getContainerObject(p, new Object());
    }

    @Test
    public void testGetPropertyDefinition() throws RepositoryAccessException {
        CMSObject root = (CMSObject) repository.get(0);
        PropertyDefinition expected = (PropertyDefinition) repository.get(8);
        Property p = root.getProperty().get(0);
        PropertyDefinition propDef = offlineAccess.getPropertyDefinition(p, null);
        assertSame(expected, propDef);

    }
View Full Code Here

Examples of org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject

        offlineAccess.canRetrieve(null);
    }

    @Test
    public void testGetParentByNode() throws RepositoryAccessException {
        CMSObject child11 = (CMSObject) repository.get(1);
        CMSObject root = (CMSObject) repository.get(0);
        CMSObject parent = offlineAccess.getParentByNode(child11, null);
        assertSame(root, parent);

        expectedException.expect(IllegalArgumentException.class);
        offlineAccess.getParentByNode(child11, new Object());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.