Source Code Cross Referenced for AttributeHandler.java in  » Portal » Open-Portal » com » sun » portal » fabric » common » 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 » Open Portal » com.sun.portal.fabric.common 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * $Id: AttributeHandler.java,v 1.7 2005/05/17 01:37:19 pd109850 Exp $
003:         * Copyright 2004 Sun Microsystems, Inc. All
004:         * rights reserved. Use of this product is subject
005:         * to license terms. Federal Acquisitions:
006:         * Commercial Software -- Government Users
007:         * Subject to Standard License Terms and
008:         * Conditions.
009:         *
010:         * Sun, Sun Microsystems, the Sun logo, and Sun ONE
011:         * are trademarks or registered trademarks of Sun Microsystems,
012:         * Inc. in the United States and other countries.
013:         */package com.sun.portal.fabric.common;
014:
015:        import java.util.List;
016:        import java.util.Map;
017:        import com.sun.portal.admin.common.PSMBeanException;
018:
019:        /**
020:         * This interface needs to be implementing by all component specific
021:         * attribute handlers. 
022:         */
023:        public interface AttributeHandler {
024:            /**
025:             * Initializes the handler
026:             *
027:             * @param component string representing the user friendly component name
028:             * @param domainId  string representing the portal domain
029:             * @param portalId  string representing the identifier for portal
030:             * @throws PSMBeanException if there was error in initilization
031:             */
032:            void init(String component, String domainId, String portalId)
033:                    throws PSMBeanException;
034:
035:            /**
036:             * Performs validation of the options in the map
037:             * This method supports validating values only for singular set 
038:             * operation. For setting values for multiple attrs, pass in null
039:             * for values and do validation before actually setting the specific
040:             * attr in the attr set.
041:             *
042:             * @values a list of values used by set to be validated
043:             * @optionsMap a map containing key-value pairs for options
044:             * @throws PSMBeanException if the validation failed
045:             */
046:            void validate(List values, Map optionsMap) throws PSMBeanException;
047:
048:            /**
049:             * Maps the user friendly name of the attribute to its real name.
050:             *
051:             * @param userFriendlyName string passed in a name of the attribute
052:             * @return real name of the attribute in backend or null if such attribute
053:             *         does not exist
054:             */
055:            String getAttributeName(String userFriendlyName);
056:
057:            /**
058:             * Maps the user friendly name of the component to its real name.
059:             *
060:             * @param userFriendlyName string passed in a name of the component
061:             * @return real name of the component in backend such as the service name
062:             */
063:            String getComponentName(String userFriendlyName);
064:
065:            /**
066:             * Returns a list of values for the attribute name passed in the map
067:             *
068:             * The optionsMap contains these in addition to component  
069:             * specific options
070:             * operation = get
071:             * //common basic options
072:             * OPT_COMPONENT = "component";
073:             * OPT_ATTR_NAME = "attribute-name";
074:             * OPT_DN = "dn";
075:             * OPT_GLOBAL = "global";
076:             * OPT_ORG = "org";
077:             * //set operation options
078:             * OPT_INHERIT = "inherit";
079:             * OPT_ADD = "add";
080:             * OPT_REMOVE = "remove";
081:             *
082:             * @param optionsMap a map containing key-value pairs for options
083:             * @return list of values for the attribute
084:             * @throws PSMBeanException if there was error in retrieving the value
085:             */
086:            List getAttribute(Map optionsMap) throws PSMBeanException;
087:
088:            /**
089:             * Returns attributes at the specific dn or at top level
090:             * If global, then dn should not be specified
091:             * If org and dn is not specified, then its org default
092:             * If neither global nor org, then its dynamic
093:             * If neither global nor org and no dn, then its dynamic default
094:             * If neither global nor org and dn is user dn, then its user attrs
095:             *
096:             * The optionsMap contains these in addition to component  
097:             * specific options
098:             * operation = get
099:             * //common basic options
100:             * OPT_COMPONENT = "component";
101:             * OPT_ATTR_NAMES = "attribute-names"
102:             * OPT_DN = "dn";
103:             * OPT_GLOBAL = "global";
104:             * OPT_ORG = "org";
105:             *
106:             * OPT_ATTR_NAMES should be a String Set of friendly attr names
107:             * The returned Map contains these attr names as keys and the values are 
108:             * List objects
109:             *
110:             * @param optionsMap a map containing key-value pairs for options
111:             * @return map of name-ListValues for the attribute
112:             * @throws PSMBeanException if there was error in retrieving the value
113:             */
114:            Map getAttributes(Map optionsMap) throws PSMBeanException;
115:
116:            /**
117:             * Sets the value(s) for the attribute name passed in the map
118:             * 
119:             * The optionsMap contains these in addition to component  
120:             * specific options
121:             * operation = set
122:             * //common basic options
123:             * OPT_COMPONENT = "component";
124:             * OPT_ATTR_NAME = "attribute-name";
125:             * OPT_DN = "dn";
126:             * OPT_GLOBAL = "global";
127:             * OPT_ORG = "org";
128:             * //set operation options
129:             * OPT_INHERIT = "inherit";
130:             * OPT_ADD = "add";
131:             * OPT_REMOVE = "remove";
132:             *
133:             * OPT_COMPONENT is the friendly service name
134:             * OPT_ATTR_NAME is the friendly attr name
135:             *
136:             * @param values list of values to be set for the component
137:             * @param optionsMap a map containing key-value pairs for options
138:             * @throws PSMBeanException if there was an error in setting the value
139:             */
140:            void setAttribute(List values, Map optionsMap)
141:                    throws PSMBeanException;
142:
143:            /**
144:             * Sets the value(s) for multiple attributes passed in the map
145:             * This method does not support add/remove/inherit. It is only 
146:             * to set the values.
147:             * 
148:             * The optionsMap contains these in addition to component  
149:             * specific options
150:             * operation = set
151:             * //common basic options
152:             * OPT_COMPONENT = "component";
153:             * OPT_DN = "dn";
154:             * OPT_GLOBAL = "global";
155:             * OPT_ORG = "org";
156:             *
157:             * OPT_COMPONENT is the friendly service name
158:             * The nameValues map consists of mapping between friendly attr name
159:             * and its value which is a List
160:             *
161:             * @param nameValues map of name-ListValues of attrs
162:             * @param optionsMap a map containing key-value pairs for options
163:             * @throws PSMBeanException if there was an error in setting the value
164:             */
165:            void setAttributes(Map nameValues, Map optionsMap)
166:                    throws PSMBeanException;
167:
168:            /**
169:             * Returns a map where the key is the user friendly name of the 
170:             * attribute and the value is a list.
171:             * The list consists of the following in this order:
172:             * <ul>
173:             * <li>type as defined in AttributeInfo (mandatory)
174:             * <li>i18n key for description like range of values etc. (optional)
175:             * <li>r/w/ro/wo privilege (optional, default is r/w) as defined in AttributeInfo
176:             * <li>i18n key for example (optional)
177:             * </ul>
178:             * The list is always in this order and if some info is not applicable
179:             * then a null is specified for it. For example, if there is no
180:             * descrition but privilege is specified, then a null 
181:             * in inserted for description. If only type is specified, then the 
182:             * list size may be "1".
183:             *
184:             * @param optionsMap a map containing key-value pairs for options
185:             * @return map containing attribute-name and information about it
186:             * @throws PSMBeanException if the there was an error
187:             */
188:            Map listAttributes(Map optionsMap) throws PSMBeanException;
189:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.