Source Code Cross Referenced for ObjectPanelModel.java in  » Testing » Unicorn » org » savarese » unicorn » ui » 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 » Testing » Unicorn » org.savarese.unicorn.ui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $Id: ObjectPanelModel.java 6115 2006-01-30 04:50:47Z dfs $
003:         *
004:         * Copyright 2004-2006 Daniel F. Savarese
005:         *
006:         * Licensed under the Apache License, Version 2.0 (the "License");
007:         * you may not use this file except in compliance with the License.
008:         * You may obtain a copy of the License at
009:         *
010:         *     http://www.savarese.org/software/ApacheLicense-2.0
011:         *
012:         * Unless required by applicable law or agreed to in writing, software
013:         * distributed under the License is distributed on an "AS IS" BASIS,
014:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015:         * See the License for the specific language governing permissions and
016:         * limitations under the License.
017:         */
018:
019:        package org.savarese.unicorn.ui;
020:
021:        import javax.management.MBeanInfo;
022:        import javax.management.AttributeNotFoundException;
023:
024:        /**
025:         * Interface for adapting objects for use by {@link ObjectPanel}.
026:         */
027:        public interface ObjectPanelModel<O extends Object> {
028:
029:            /**
030:             * Sets the object to be adapted to the interface.
031:             *
032:             * @param obj The object to be adapted.
033:             */
034:            public void setObject(O obj);
035:
036:            /**
037:             * Retrieves the object adapted to the interface.
038:             *
039:             * @return The object adapted to the interface.
040:             */
041:            public O getObject();
042:
043:            /**
044:             * Returns a string that identifies the object.
045:             *
046:             * @return A string that identifies the object.
047:             */
048:            public String getObjectName();
049:
050:            /**
051:             * Returns a description of the object.
052:             *
053:             * @return The a description of the object.
054:             */
055:            public MBeanInfo getObjectInfo();
056:
057:            /**
058:             * Determines if the model is in a valid state.  A model may be
059:             * rendered invalid if it has no object, if an exception is occurs
060:             * during a remote invocation operation, or any number of reasons
061:             * specific to the model implementation.
062:             *
063:             * @return True if the model is in a valid state, false if not.
064:             */
065:            public boolean isValid();
066:
067:            /**
068:             * Retrieves a named attribute from the adapted object.
069:             *
070:             * @param attribute The name of the attribute to retrieve.
071:             * @return The attribute corresponding to the provided name.
072:             * @throws AttributeNotFoundException If the attribute does not exist.
073:             * @throws Exception If an error occurs while retrieving the
074:             * attribute.  An exception may occur while communicating with a
075:             * remote object, while using reflection, or other reasons specific
076:             * to the model implementation.
077:             */
078:            public Object getAttribute(String attribute)
079:                    throws AttributeNotFoundException, Exception;
080:
081:            /**
082:             * Sets the value of a named attribute of the adapted object.
083:             *
084:             * @param attribute The name of the attribute to set.
085:             * @param value The new value of the attribute.
086:             * @throws AttributeNotFoundException If the attribute does not exist.
087:             * @throws Exception If an error occurs while retrieving the
088:             * attribute.  An exception may occur while communicating with a
089:             * remote object, while using reflection, or other reasons specific
090:             * to the model implementation.
091:             */
092:            public void setAttribute(String attribute, Object value)
093:                    throws AttributeNotFoundException, Exception;
094:
095:            /**
096:             * Invokes an operation of the adapted object and returns its result,
097:             * if any.
098:             *
099:             * @param operation The name of the operation to invoke.
100:             * @param params An array of parameters for the operation.
101:             * @param types An array containing the types of the operation parameters.
102:             * @param signature A string representation of the types (i.e., the
103:             *        fully qualified class names) of the operation parameters.
104:             * @return The result of the operation, if any.
105:             * @throws Exception If an unexpected condition arises that prvents
106:             *         the successful invocation of the operation.
107:             */
108:            public Object invoke(String operation, Object[] params,
109:                    Class[] types, String[] signature) throws Exception;
110:
111:            /**
112:             * Adds an {@link ObjectPanelModelListener} to the model.  The
113:             * listener is notifiied whenever the model changes.
114:             *
115:             * @param listener The listener to add.
116:             */
117:            public void addObjectPanelModelListener(
118:                    ObjectPanelModelListener<O> listener);
119:
120:            /**
121:             * Removes an {@link ObjectPanelModelListener} from the model.
122:             *
123:             * @param listener The listener to remove.
124:             */
125:            public void removeObjectPanelModelListener(
126:                    ObjectPanelModelListener<O> listener);
127:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.