Package org.apache.jetspeed.layout

Examples of org.apache.jetspeed.layout.PortletPlacementException


    {
        if ( container == null )
        {
            container = page.getRootFragment();
            if ( container == null )
              throw new PortletPlacementException( "PortletPlacementContext cannot acquire root layout fragment from page" );
        }       
        if ( ! "layout".equals( container.getType() ) )
        {
          throw new PortletPlacementException( "PortletPlacementContext specified container fragment (" + container.getId() + ") is not a layout fragment, but is type: " + container.getType() );
        }
        this.layoutContainerFragment = container;
       
        int columnCount = PortletPlacementContextImpl.getColumnCountAndSizes( container, registry, null );
        if ( columnCount <= 0 )
        {
          throw new PortletPlacementException( "PortletPlacementContext cannot detemine number of columns in layout fragment (" + container.getId() + ")" );
        }
        this.numberOfColumns = columnCount;
       
        initProcessLayoutContainerFragment();
       
View Full Code Here


    // Do some sanity checking about the request
    if ( col < 0 || col >= this.numberOfColumns )
        {
      if ( suppressExceptions )
        return null;
      throw new PortletPlacementException( "Requested column (" + col + ") is out of bounds (column-count=" + this.numberOfColumns + ")" );
    }
   
    // Get the array list associated with the column
    ArrayList columnArray = this.columnsList[col];
    if ( row < 0 || row >= columnArray.size() )
        {
      if ( suppressExceptions )
        return null;
      throw new PortletPlacementException( "Requested row (" + row + ") is out of bounds (col[" + col + "].row-count=" + columnArray.size() + ")" );
    }
   
    return (Fragment)columnArray.get( row );
  }
View Full Code Here

  public int getNumberRows( int col ) throws PortletPlacementException
    {
    // Sanity check the column
    if ( col < 0 || col >= this.numberOfColumns )
        {
      throw new PortletPlacementException( "Requested column (" + col + ") is out of bounds (column-count=" + this.numberOfColumns + ")" );
    }
    return this.columnsList[col].size();
  }
View Full Code Here

          if ( rowIndex < 0 || rowIndex >= colFragCount )
            out.append( "row is out of bounds, " );
          out.append( "row-count=" ).append( colFragCount );
        }
        out.append( ")" );
        throw new PortletPlacementException( out.toString() );
      }
    }
    return fragment;
  }
View Full Code Here

    int newRow = coordinate.getNewRow();
   
    // Check to see if the column exists
    if(newCol < 0 || newCol > this.columnsList.length)
        {
      throw new PortletPlacementException("column out of bounds" + fragment.getName());
    }
   
    Vector columnArray = (Vector)this.columnsList[newCol];

    // Make sure the list has enough room for the set
View Full Code Here

    }
   
    // Do some sanity checking about the request
    if(col < 0 || col > this.columnsList.length)
        {
      throw new PortletPlacementException("requested column is out of bounds");
    }
   
    // Get the array list associated with the column
    Vector columnArray = this.columnsList[col];
    if(row < 0 || row > columnArray.size())
        {
      throw new PortletPlacementException("requested row is out of bounds");
    }
   
    return (Fragment)columnArray.get(row);
  }
View Full Code Here

  public int getNumberRows(int col) throws PortletPlacementException
    {
    // Sanity check the column
    if(col < 0 || col > this.columnsList.length)
        {
      throw new PortletPlacementException("column out of bounds");
    }
   
    return this.columnsList[col].size();
  }
View Full Code Here

    {
    // Find the fragment
    Coordinate oldCoordinate = (Coordinate)this.fragmentCoordinateMap.get(fragment);
    if(oldCoordinate == null)
        {
      throw new PortletPlacementException("could not find fragment");
    }
   
    // Save the old coordinates
    int oldCol = oldCoordinate.getOldCol();
    int oldRow = oldCoordinate.getOldRow();
View Full Code Here

    {
    // Find the fragment
    Coordinate foundCoordinate = (Coordinate)this.fragmentCoordinateMap.get(fragment);
    if(foundCoordinate == null)
        {
      throw new PortletPlacementException("could not find fragment");
    }

    // Check the coordinates to make sure that there is room to move down
    int oldCol = foundCoordinate.getOldCol();
    int oldRow = foundCoordinate.getOldRow();
View Full Code Here

    {
    // Locate the fragment
    Coordinate coordinate = (Coordinate)this.fragmentCoordinateMap.get(fragment);
    if(coordinate == null)
        {
      throw new PortletPlacementException("fragment not found:" + fragment.getName());
    }
   
    int col = coordinate.getOldCol();
    int row = coordinate.getOldRow();
   
    if(col < 0 || col > this.columnsList.length)
        {
      throw new PortletPlacementException("column out of bounds:" + fragment.getName());
    }
   
    Vector columnArray = (Vector)this.columnsList[col];
    if(row < 0 || row > columnArray.size())
        {
      throw new PortletPlacementException("row out of bounds:" + fragment.getName());
    }
   
    // Remove the fragment from the array
    columnArray.remove(row);
   
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.layout.PortletPlacementException

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.