success = false;
resultMap.put(REASON, "Insufficient access to edit page");
return success;
}
PortletPlacementContext placement = new PortletPlacementContextImpl(requestContext);
Fragment fragment = placement.getFragmentById(portletId);
Coordinate returnCoordinate = null;
// Only required for moveabs
if (iMoveType == ABS)
{
String a_sCol = requestContext.getRequestParameter(COL);
String a_sRow = requestContext.getRequestParameter(ROW);
// Convert the col and row into integers
int a_iCol = Integer.parseInt(a_sCol);
int a_iRow = Integer.parseInt(a_sRow);
Coordinate a_oCoordinate = new CoordinateImpl(0, 0, a_iCol,
a_iRow);
returnCoordinate = placement.moveAbsolute(fragment, a_oCoordinate);
}
else if (iMoveType == LEFT)
{
returnCoordinate = placement.moveLeft(fragment);
}
else if (iMoveType == RIGHT)
{
returnCoordinate = placement.moveRight(fragment);
}
else if (iMoveType == UP)
{
returnCoordinate = placement.moveUp(fragment);
}
else if (iMoveType == DOWN)
{
returnCoordinate = placement.moveDown(fragment);
}
// synchronize back to the page layout root fragment
Page page = placement.syncPageFragments();
if (pageManager != null)
pageManager.updatePage(page);
// Use dummy values for now