Package com.dotmarketing.portlets.containers.model

Examples of com.dotmarketing.portlets.containers.model.Container


        assertEquals(cc.getPreLoop(),"new preloop");
    }

    @Test
    public void delete() throws Exception {
        Container container = new Container();
        container.setFriendlyName("test container");
        container.setTitle("his is the title");
        container.setMaxContentlets(5);
        container.setPreLoop("preloop code");
        container.setPostLoop("postloop code");

        Structure st=StructureCache.getStructureByVelocityVarName("host");

        User user = APILocator.getUserAPI().getSystemUser();
        Host host = APILocator.getHostAPI().findDefaultHost(user, false);

        List<ContainerStructure> csList = new ArrayList<ContainerStructure>();
        ContainerStructure cs = new ContainerStructure();
        cs.setStructureId(st.getInode());
        cs.setCode("this is the code");
        csList.add(cs);
        Container saved = APILocator.getContainerAPI().save(container, csList, host, user, false);

        String inode=saved.getInode();
        String identifier=saved.getIdentifier();

        assertTrue(APILocator.getContainerAPI().delete(saved, user, false));

        AssetUtil.assertDeleted(inode, identifier, "containers");
    }
View Full Code Here



      HibernateUtil.startTransaction();

      // CONTAINER
      container = new Container();

      Structure simpleWidgetSt = StructureCache.getStructureByVelocityVarName("SimpleWidget");

      container.setCode( "$!{story}" );
      container.setFriendlyName( "newsTestContainer" );
View Full Code Here

TOP

Related Classes of com.dotmarketing.portlets.containers.model.Container

Copyright © 2018 www.massapicom. 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.