Source Code Cross Referenced for Service.java in  » Swing-Library » jEdit » net » sourceforge » jarbundler » 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 » Swing Library » jEdit » net.sourceforge.jarbundler 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package net.sourceforge.jarbundler;
002:
003:        import java.util.ArrayList;
004:        import java.util.Arrays;
005:        import java.util.List;
006:
007:        /**
008:         * Represents an Info.plist Service specifying a service provided by the application.
009:         * 
010:         * Port Name - The name of the port the application monitors for incoming service requests.
011:         * 
012:        
013:         * Message - The name of the instance method to invoke for the service. 
014:         * In Objective-C, the instance method must be of the form messageName:userData:error:.
015:         * In Java, the instance method must be of the form messageName(NSPasteBoard,String).
016:         * 
017:         * 
018:         * Menu Item - The text to add to the Services menu. The value must be unique.
019:         * You can use a slash character "/" to specify a submenu. For example, Mail/Send
020:         * would appear in the Services Menu as a menu named Mail with an item named Send.
021:         * 
022:         * 
023:         * Send Types - A list of the data type names that can be read by the service.
024:         *   The NSPasteboard class description lists several common data types.
025:         *
026:         *
027:         * Return Types - A list of the data type names that can be returned by the service.
028:         * The NSPasteboard class description lists several common data types.
029:         * You must specify either Return Types, Send Types or both.
030:         * 
031:         * You must specify either Send Types, Return Types or both.
032:         *  
033:         * 
034:         * Key Equivalent - This attribute is optional. The keyboard equivalent used to invoke
035:         * the service menu command. The value has to be a single character. Users invoke this
036:         * keyboard equivalent by pressing the Command and Shift key modifiers along with the character.
037:         * 
038:         * 
039:         * User Data - This attribute is optional. The value is free choosable and is passed
040:         * to the method as second parameter.
041:         * 
042:         * 
043:         * Timeout - This attribute is optional. It indicates the number of milliseconds
044:         * Services should wait for a response from the application providing
045:         * a service when a respond is required.
046:         * 
047:         * 
048:         * <service portname="jarBundler"
049:         *          message="processRequest"
050:         *          menuitem="JarBundler/Process Request"
051:         *          sendtypes="NSStringPboardType,NSFilenamesPboardType"
052:         *          returntypes="NSStringPboardType"
053:         *          keyequivalent="p"
054:         *          userdata="a string passed to the method"
055:         *          timeout="5000" />
056:         */
057:        public class Service {
058:            private static final List EMPTYLIST = new ArrayList(0);
059:
060:            /** The name of the port the application monitors for incoming service requests. */
061:            private String portName = null;
062:
063:            /** 
064:
065:             * The name of the instance method to invoke for the service. 
066:             * In Objective-C, the instance method must be of the form messageName:userData:error:.
067:
068:             * In Java, the instance method must be of the form messageName(NSPasteBoard,String).
069:             */
070:            private String message = null;
071:
072:            /** 
073:
074:             * The text to add to the Services menu. The value must be unique.
075:
076:             * You can use a slash character "/" to specify a submenu. For example, Mail/Send
077:
078:             * would appear in the Services Menu as a menu named Mail with an item named Send.
079:             */
080:            private String menuItem = null;
081:
082:            /**
083:             * A list of the data type names that can be read by the service.
084:
085:             * The NSPasteboard class description lists several common data types.
086:
087:             * You must specify either Send Types, Return Types or both.
088:             */
089:            private String[] sendTypes = null;
090:
091:            /**
092:             * A list of the data type names that can be returned by the service.
093:
094:             * The NSPasteboard class description lists several common data types.
095:
096:             * You must specify either Return Types, Send Types or both.
097:             */
098:            private String[] returnTypes = null;
099:
100:            /**
101:             * This attribute is optional. The keyboard equivalent used to invoke
102:
103:             * the service menu command. The value has to be a single character. Users invoke this
104:
105:             * keyboard equivalent by pressing the Command and Shift key modifiers along with the character.
106:
107:             */
108:            private String keyEquivalent = null;
109:
110:            /** 
111:
112:             * This attribute is optional. The value is free choosable and is passed
113:
114:             * to the method as second parameter.
115:
116:             */
117:            private String userData = null;
118:
119:            /** 
120:
121:             * This attribute is optional. It indicates the number of milliseconds
122:
123:             * Services should wait for a response from the application providing
124:
125:             * a service when a respond is required.
126:
127:             */
128:            private String timeout = null;
129:
130:            public void setPortName(String portName) {
131:                this .portName = portName;
132:            }
133:
134:            public String getPortName() {
135:                return portName;
136:            }
137:
138:            public void setMessage(String message) {
139:                this .message = message;
140:            }
141:
142:            public String getMessage() {
143:                return message;
144:            }
145:
146:            public void setMenuItem(String menuItem) {
147:                this .menuItem = menuItem;
148:
149:            }
150:
151:            public String getMenuItem() {
152:                return menuItem;
153:            }
154:
155:            public void setSendTypes(String sendTypes) {
156:                this .sendTypes = sendTypes.split("[\\s,]");
157:            }
158:
159:            public List getSendTypes() {
160:                return (sendTypes == null) ? EMPTYLIST : Arrays
161:                        .asList(sendTypes);
162:            }
163:
164:            public void setReturnTypes(String returnTypes) {
165:                this .returnTypes = returnTypes.split("[\\s,]");
166:            }
167:
168:            public List getReturnTypes() {
169:                return (returnTypes == null) ? EMPTYLIST : Arrays
170:                        .asList(returnTypes);
171:            }
172:
173:            public void setKeyEquivalent(String keyEquivalent) {
174:                this .keyEquivalent = keyEquivalent;
175:            }
176:
177:            public String getKeyEquivalent() {
178:                return keyEquivalent;
179:            }
180:
181:            public void setUserData(String userData) {
182:                this .userData = userData;
183:            }
184:
185:            public String getUserData() {
186:                return userData;
187:            }
188:
189:            public void setTimeout(String timeout) {
190:                this .timeout = timeout;
191:            }
192:
193:            public String getTimeout() {
194:                return timeout;
195:            }
196:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.