Java Doc for PositionManager.java in  » Portal » uPortal_rel-2-6-1-GA » org » jasig » portal » layout » dlm » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » uPortal_rel 2 6 1 GA » org.jasig.portal.layout.dlm 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jasig.portal.layout.dlm.PositionManager

PositionManager
public class PositionManager (Code)
Applies and updates position specifiers for child nodes in the composite layout.
version:
   $Revision: 36294 $ $Date: 2005-11-10 12:36:31 -0700 (Thu, 10 Nov 2005) $
since:
   uPortal 2.5

Inner Class :static class NodeInfoComparator implements Comparator

Field Summary
final public static  StringRCS_ID
    


Method Summary
static  voidadjustPositionSet(ArrayList order, Element positionSet, IntegrationResult result)
     This method trims down the position set to the position directives on the node info elements still having a position directive.
static  voidapplyLowerPrecedence(ArrayList order, Element compViewParent, Element positionSet)
     This method is responsible for preventing nodes with lower precedence from being located to the left (lower sibling order) of nodes having a higher precedence and moveAllowed="false".
static  voidapplyNoHopping(ArrayList order, Element compViewParent, Element positionSet)
     This method is responsible for preventing nodes with identical precedence in the same parent from hopping over each other so that a layout fragment can lock two tabs that are next to each other and they can only be separated by tabs with higher precedence.
static  voidapplyNoReparenting(ArrayList order, Element compViewParent, Element positionSet)
     This method scans through the nodes in the ordered list and identifies those that are not in the passed in compViewParent.
static  voidapplyOrdering(ArrayList order, Element compViewParent, Element positionSet)
     This method assembles in the passed in order object a list of NodeInfo objects ordered first by those specified in the position set and whose nodes still exist in the composite view and then by any remaining children in the compViewParent.
static  voidapplyPositions(Element compViewParent, Element positionSet, IntegrationResult result)
     This method and ones that it delegates to have the responsibility of organizing the child nodes of the passed in composite view parent node according to the order specified in the passed in position set and return via the passed in result set whether the personal layout fragment (one portion of which is the position set) or the incoporated layouts fragment (one portion of which is the compViewParent) were changed. This may also include pulling nodes in from other parents under certain circumstances.
static  voidapplyToNodes(ArrayList order, Element compViewParent)
     This method applies the ordering specified in the passed in order list to the child nodes of the compViewParent.
static  voidevaluateAndApply(ArrayList order, Element compViewParent, Element positionSet, IntegrationResult result)
     This method determines if applying all of the positioning rules and restrictions ended up making changes to the compViewParent or the original position set.
static  booleanhasAffectOnCVP(ArrayList order, Element compViewParent)
     This method compares the children by id in the order list with the order in the compViewParent's ui visible children and returns true if the ordering differs indicating that the positioning if needed.
static  booleanisIllegalHoppingSpecified(ArrayList order)
     This method determines if any illegal hopping is being specified.
public static  voidupdatePositionSet(Element compViewParent, Element plfParent, IPerson person)
     This method updates the positions recorded in a position set to reflect the ids of the nodes in the composite view of the layout.

Field Detail
RCS_ID
final public static String RCS_ID(Code)





Method Detail
adjustPositionSet
static void adjustPositionSet(ArrayList order, Element positionSet, IntegrationResult result)(Code)
This method trims down the position set to the position directives on the node info elements still having a position directive. Any directives that violated restrictions were removed from the node info objects so the position set should be made to match the order of those still having one.



applyLowerPrecedence
static void applyLowerPrecedence(ArrayList order, Element compViewParent, Element positionSet)(Code)
This method is responsible for preventing nodes with lower precedence from being located to the left (lower sibling order) of nodes having a higher precedence and moveAllowed="false".



applyNoHopping
static void applyNoHopping(ArrayList order, Element compViewParent, Element positionSet)(Code)
This method is responsible for preventing nodes with identical precedence in the same parent from hopping over each other so that a layout fragment can lock two tabs that are next to each other and they can only be separated by tabs with higher precedence. If this situation is detected then the positioning of all nodes currently in the compViewParent is left as they are found in the CVP with any nodes brought in from other parents appended at the end with their relative order preserved.



applyNoReparenting
static void applyNoReparenting(ArrayList order, Element compViewParent, Element positionSet)(Code)
This method scans through the nodes in the ordered list and identifies those that are not in the passed in compViewParent. For those it then looks in its current parent and checks to see if there are any down- stream (higher sibling index) siblings that have moveAllowed="false". If any such sibling is found then the node is not allowed to be reparented and is removed from the list.



applyOrdering
static void applyOrdering(ArrayList order, Element compViewParent, Element positionSet)(Code)
This method assembles in the passed in order object a list of NodeInfo objects ordered first by those specified in the position set and whose nodes still exist in the composite view and then by any remaining children in the compViewParent.



applyPositions
static void applyPositions(Element compViewParent, Element positionSet, IntegrationResult result) throws PortalException(Code)
This method and ones that it delegates to have the responsibility of organizing the child nodes of the passed in composite view parent node according to the order specified in the passed in position set and return via the passed in result set whether the personal layout fragment (one portion of which is the position set) or the incoporated layouts fragment (one portion of which is the compViewParent) were changed. This may also include pulling nodes in from other parents under certain circumstances. For example, if allowed a user can move nodes that are not part of their personal layout fragment or PLF; the UI elements that they own. These node do not exist in their layout in the database but instead are merged in with their owned elements at log in and other times. So to move them during subsequent merges a position set can contain a position directive indicating the id of the node to be moved into a specific position in the sibling list and that well may refer to a node not in the sibling list to begin with. If the node no longer exists in the composite view then that position directive can safely be discarded. Positioning is meant to preserve as much as possible the user's specified ordering of user interface elements but always respecting movement restrictions placed on those elements that are incorporated by their owners. So the following rules apply from most important to least. 1) nodes with moveAllowed="false" prevent nodes of lower precedence from being to their left or higher with left or higher defined as having a lower index in the sibling list. (applyLowerPrecRestriction) 2) nodes with moveAllowed="false" prevent nodes of equal precedence from moving from one side of this node to the other from their position as found in the compViewParent initially and prevents nodes with the same precedence from moving from other parents into this parent prior to the restricted node. Prior to implies a lower sibling index. (applyHoppingRestriction) 3) nodes with moveAllowed="false" prevent nodes of equal precedence lower in the sibling list from being reparented. (ie: moving to another parent) However, they can be deleted. (applyReparentingCheck) 4) nodes should be ordered as much as possible in the order specified by the user but in view of the above conditions. So if a user has moved nodes thus specifying some order and the owner of some node in that set then locks one of those nodes some of those nodes will have to move back to their orinial positions to conform with the rules above but for the remaining nodes they should be found in the same relative order specified by the user. (getOrder) 5) nodes not included in the order specified by the user (ie: nodes added since the user last ordered them) should maintain their relative order as much as possible and be appended to the end of the sibling list after all others rules have been applied. (getOrder) Each of these rules is applied by a call to a method 5 being first and 1 being last so that 1 has the highest precedence and last say. Once the final ordering is specified then it is applied to the children of the compViewParent and returned.



applyToNodes
static void applyToNodes(ArrayList order, Element compViewParent)(Code)
This method applies the ordering specified in the passed in order list to the child nodes of the compViewParent. Nodes specified in the list but located elsewhere are pulled in.



evaluateAndApply
static void evaluateAndApply(ArrayList order, Element compViewParent, Element positionSet, IntegrationResult result) throws PortalException(Code)
This method determines if applying all of the positioning rules and restrictions ended up making changes to the compViewParent or the original position set. If changes are applicable to the CVP then they are applied. If the position set changed then the original stored in the PLF is updated.



hasAffectOnCVP
static boolean hasAffectOnCVP(ArrayList order, Element compViewParent)(Code)
This method compares the children by id in the order list with the order in the compViewParent's ui visible children and returns true if the ordering differs indicating that the positioning if needed.



isIllegalHoppingSpecified
static boolean isIllegalHoppingSpecified(ArrayList order)(Code)
This method determines if any illegal hopping is being specified. To determine if the positioning is specifying an ordering that will result in hopping I need to determine for each node n in the list if any of the nodes to be positioned to its right currently lie to its left in the CVP and have moveAllowed="false" and have the same precedence or if any of the nodes to be positioned to its left currently lie to its right in the CVP and have moveAllowed="false" and have the same precedence.



updatePositionSet
public static void updatePositionSet(Element compViewParent, Element plfParent, IPerson person) throws PortalException(Code)
This method updates the positions recorded in a position set to reflect the ids of the nodes in the composite view of the layout. Any position nodes already in existence are reused to reduce database interaction needed to generate a new ID attribute. If any are left over after updating those position elements are removed. If no position set existed a new one is created for the parent. If no ILF nodes are found in the parent node then the position set as a whole is reclaimed.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.