Package org.jasig.portal.layout.node

Examples of org.jasig.portal.layout.node.IUserLayoutNodeDescription


        assertTrue("addNode() returned null",rchan!=null);
        nchan.setId(rchan.getId());
        assertEquals("comparing the original and addNode() result: ",nchan,rchan);

        // do a get
        IUserLayoutNodeDescription gnode=man.getNode(nchan.getId());
        assertEquals("comparing the original and getNode() result: ",nchan,gnode);
        assertEquals("parentId is the specified attachment point",parentId,man.getParentId(nchan.getId()));
        assertEquals("siblingId is the specified next sibling",siblingId,man.getNextSiblingId(nchan.getId()));

        assertTrue("nodeAdded event received",nodeAdded);
View Full Code Here


        assertTrue("addNode() returned null",rfold!=null);
        nfold.setId(rfold.getId());
        assertEquals("comparing the original and addNode() result: ",nfold,rfold);

        // do a get
        IUserLayoutNodeDescription gnode=man.getNode(nfold.getId());
        assertEquals("comparing the original and getNode() result: ",nfold,gnode);
        assertEquals("parentId is the specified attachment point",parentId,man.getParentId(nfold.getId()));

        assertTrue("nodeAdded event received",nodeAdded);
        assertTrue("LayoutEvent is not null",lastEvent!=null);
View Full Code Here

        String parentId= IUserLayout.ROOT_NODE_NAME;
        man.deleteNode(nodeId);

        boolean exception=false;
        try {
            IUserLayoutNodeDescription node=man.getNode(nodeId);
        } catch (PortalException e) {
            exception=true;
        }
       
        assertTrue("Thrown an exception when looking for a deleted node or returned a node with no parent.",exception || man.getParentId(nodeId)==null);
View Full Code Here

        // see if the channel has already been instantiated
        // see if the channel is cached
        IChannel ch;
        long timeOut=0;

        IUserLayoutNodeDescription node=upm.getUserLayoutManager().getNode(channelSubscribeId);
        if(!(node instanceof IUserLayoutChannelDescription)) {
            throw new PortalException("\""+channelSubscribeId+"\" is not a channel node !");
        }

        IUserLayoutChannelDescription channel=(IUserLayoutChannelDescription) node;
View Full Code Here

      }
    }

    private void prepareSaveEditedItem() throws PortalException {
      // update node name
      IUserLayoutNodeDescription node=getUserLayoutManager().getNode(editElementID);
      node.setName(runtimeData.getParameter("name"));
      getUserLayoutManager().updateNode(node);
     
      // reset the name
      if (node instanceof IUserLayoutChannelDescription) {
        // target is a channel
View Full Code Here

      bstate.setRuntimeData(runtimeData);
      context.setState(bstate);
    }

    public void renderXML(ContentHandler out) throws PortalException {
        IUserLayoutNodeDescription node=getUserLayoutManager().getNode(editElementID);
        String elType="folder";
        if(node instanceof IUserLayoutChannelDescription) {
            elType="channel";
        }

      // construct the descriptive XML
      Document doc = DocumentFactory.getNewDocument();
      Element edEl = doc.createElement("editelement");
      Element typeEl = doc.createElement("type");
      if (elType.equals("folder")) {
        typeEl.appendChild(doc.createTextNode("folder"));
      } else {
        typeEl.appendChild(doc.createTextNode("channel"));
      }

      edEl.appendChild(typeEl);
      Element nameEl = doc.createElement("name");
      nameEl.appendChild(doc.createTextNode(node.getName()));
      edEl.appendChild(nameEl);
      // determine element type
      if (elType.equals("folder")) {
        // target is a folder
        StructureStylesheetUserPreferences ssup = context.getUserPreferences().getStructureStylesheetUserPreferences();
View Full Code Here

      }
    }

    private void prepareSaveEditedItem() throws PortalException {
      // update node name
      IUserLayoutNodeDescription node=getUserLayoutManager().getNode(editElementID);
      node.setName(runtimeData.getParameter("name"));
      getUserLayoutManager().updateNode(node);

      // reset the name
      if (node instanceof IUserLayoutChannelDescription) {
        // target is a channel
View Full Code Here

      bstate.setRuntimeData(runtimeData);
      context.setState(bstate);
    }

    public void renderXML(ContentHandler out) throws PortalException {
        IUserLayoutNodeDescription node=getUserLayoutManager().getNode(editElementID);
        String elType="folder";
        if(node instanceof IUserLayoutChannelDescription) {
            elType="channel";
        }

      // construct the descriptive XML
      Document doc = DocumentFactory.getNewDocument();
      Element edEl = doc.createElement("editelement");
      Element typeEl = doc.createElement("type");
      if (elType.equals("folder")) {
        typeEl.appendChild(doc.createTextNode("folder"));
      } else {
        typeEl.appendChild(doc.createTextNode("channel"));
      }

      edEl.appendChild(typeEl);
      Element nameEl = doc.createElement("name");
      nameEl.appendChild(doc.createTextNode(node.getName()));
      edEl.appendChild(nameEl);
      // determine element type
      if (elType.equals("folder")) {
        // target is a folder
        StructureStylesheetUserPreferences ssup = context.getUserPreferences().getStructureStylesheetUserPreferences();
View Full Code Here

                                           String editAllowed,
                                           String addChildAllowed,
                                           String deleteAllowed )
        throws Exception
    {
        IUserLayoutNodeDescription node = ulm.getNode(id);

        node.setDeleteAllowed( getRestriction( deleteAllowed ) );
        node.setMoveAllowed( getRestriction( moveAllowed ) );

        if( node instanceof UserLayoutFolderDescription )
        {
            UserLayoutFolderDescription fldr = null;
            fldr = (UserLayoutFolderDescription) node;
View Full Code Here

   */
  private final void moveChannel(String sourceChannelSubscribeId, String method, String destinationElementId) throws PortalException
  {
      if(isTab(destinationElementId)) {
          // create a new column and move channel there
          IUserLayoutNodeDescription newColumn=ulm.addNode(createFolder("Column"),destinationElementId,null);
          ulm.moveNode(sourceChannelSubscribeId,newColumn.getId(),null);
      } else if(isColumn(destinationElementId)) {
          // move the channel into the column
          ulm.moveNode(sourceChannelSubscribeId,destinationElementId,null);
      } else {
          // assume that destinationElementId is that of a sibling channel
View Full Code Here

TOP

Related Classes of org.jasig.portal.layout.node.IUserLayoutNodeDescription

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.