Source Code Cross Referenced for UserLayoutRestriction.java in  » Portal » uPortal_rel-2-6-1-GA » org » jasig » portal » layout » restrictions » 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.restrictions 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright 2002 The JA-SIG Collaborative.  All rights reserved.
002:         *  See license distributed with this file and
003:         *  available online at http://www.uportal.org/license.html
004:         */
005:
006:        package org.jasig.portal.layout.restrictions;
007:
008:        import org.jasig.portal.PortalException;
009:        import org.jasig.portal.layout.node.ILayoutNode;
010:
011:        /**
012:         * UserLayoutRestriction summary sentence goes here.
013:         *
014:         * @author Michael Ivanov
015:         * @version $Revision: 36684 $
016:         */
017:
018:        public abstract class UserLayoutRestriction implements 
019:                IUserLayoutRestriction {
020:
021:            private String name;
022:            private String restrictionExpression;
023:            protected String nodePath;
024:
025:            public UserLayoutRestriction() {
026:                this ("", LOCAL_RESTRICTION_PATH);
027:            }
028:
029:            public UserLayoutRestriction(String name) {
030:                this (name, LOCAL_RESTRICTION_PATH);
031:            }
032:
033:            public UserLayoutRestriction(String name, String nodePath) {
034:                this .name = name;
035:                this .nodePath = nodePath;
036:            }
037:
038:            /**
039:             * Sets the name of the current restriction
040:             * @param name <code>String</code> name
041:             */
042:            public void setName(String name) {
043:                this .name = name;
044:            }
045:
046:            /**
047:             * Returns the name of the current restriction
048:             * @return name <code>String</code> name
049:             */
050:            public String getName() {
051:                return name;
052:            }
053:
054:            /**
055:             * Sets the restriction path
056:             * @param nodePath a <code>String</code> path
057:             */
058:            public void setRestrictionPath(String nodePath) {
059:                this .nodePath = nodePath;
060:            }
061:
062:            /**
063:             * Parses the restriction expression of the current node
064:             * @exception PortalException
065:             */
066:            protected abstract void parseRestrictionExpression()
067:                    throws PortalException;
068:
069:            /**
070:             * Checks the restriction for the given property value
071:             * @param propertyValue a <code>String</code> property value to be checked
072:             * @exception PortalException
073:             */
074:            public abstract boolean checkRestriction(String propertyValue)
075:                    throws PortalException;
076:
077:            /**
078:             * Checks the restriction on a given node
079:             * @param node a <code>ILayoutNode</code> node
080:             * @return a boolean value
081:             * @exception PortalException
082:             */
083:            public boolean checkRestriction(ILayoutNode node)
084:                    throws PortalException {
085:                return true;
086:            }
087:
088:            /**
089:             * Gets the restriction name
090:             * @return a <code>String</code> restriction name
091:             */
092:            public String getUniqueKey() {
093:                return getUniqueKey(getName(), nodePath);
094:            }
095:
096:            /**
097:             * Gets the restriction name based on a restriction name and a node path
098:             * @param restrictionName a restriction name
099:             * @param nodePath a <code>String</code> node path
100:             * @return a <code>String</code> restriction name
101:             */
102:            public static String getUniqueKey(String restrictionName,
103:                    String nodePath) {
104:                if (nodePath != null && nodePath.length() > 0)
105:                    nodePath = LOCAL_RESTRICTION_PATH;
106:                return restrictionName + ":" + nodePath;
107:            }
108:
109:            /**
110:             * Gets the local restriction name based on a restriction type
111:             * @param restrictionName a restriction name
112:             * @return a <code>String</code> restriction name
113:             */
114:            public static String getUniqueKey(String restrictionName) {
115:                return getUniqueKey(restrictionName, LOCAL_RESTRICTION_PATH);
116:            }
117:
118:            /**
119:             * Sets the restriction expression
120:             * @param restrictionExpression a <code>String</code> expression
121:             */
122:            public void setRestrictionExpression(String restrictionExpression) {
123:                if (!restrictionExpression.equals(this .restrictionExpression)) {
124:                    this .restrictionExpression = restrictionExpression;
125:                    try {
126:                        parseRestrictionExpression();
127:                    } catch (PortalException pe) {
128:                        pe.printStackTrace();
129:                        System.out.println("restriction expression: "
130:                                + restrictionExpression);
131:                        System.out.println("setRestrictionExpression: " + pe);
132:                    }
133:                }
134:            }
135:
136:            /**
137:             * Gets the restriction expression
138:             * @return a <code>String</code> expression
139:             */
140:            public String getRestrictionExpression() {
141:                return restrictionExpression;
142:            }
143:
144:            /**
145:             * Gets the tree path for the current restriction
146:             * @return a <code>String</code> tree path
147:             */
148:            public String getRestrictionPath() {
149:                return nodePath;
150:            }
151:
152:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.