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


001:        /**
002:         * $Id: AddressBook.java,v 1.5 2003/06/23 20:10:06 byork Exp $
003:         * Copyright 2002 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 iPlanet
011:         * are trademarks or registered trademarks of Sun Microsystems,
012:         * Inc. in the United States and other countries.
013:         */package com.sun.addressbook;
014:
015:        import java.util.Vector;
016:        import java.util.Properties;
017:        import java.util.Enumeration;
018:
019:        /**
020:         * Address Book abstract class: encapsulates the commands to be
021:         * carried out on the address book. The Adapters implement the various
022:         * commands.
023:         *
024:         */
025:        public abstract class AddressBook extends Element {
026:
027:            /**
028:             * Parent ABStore associated with this address book.
029:             */
030:            protected ABStore store;
031:
032:            /**
033:             * address book ID corresponding to this user's address book store.
034:             */
035:            protected String abID;
036:
037:            /**
038:             * The locale of the address book user.
039:             */
040:            protected String locale;
041:
042:            /**
043:             * Address Book constructor.
044:             *
045:             * @param store 	The ABStore this address book belongs to
046:             */
047:            protected AddressBook(ABStore store, String abID) {
048:                this .store = store;
049:                this .abID = abID;
050:                this .elementType = Element.ADDRESSBOOK;
051:            }
052:
053:            // Accessor methods
054:
055:            /**
056:             * Return the address book id for this address book.
057:             *
058:             * @return		address book id associated with this address book.
059:             */
060:            public String getAbID() {
061:                return abID;
062:            }
063:
064:            /**
065:             * Return the ABStore for this address book.
066:             *
067:             * @return		address book store associated with this address book.
068:             */
069:            public ABStore getStore() {
070:                return store;
071:            }
072:
073:            /**
074:             * Return the locale of the address book user.
075:             *
076:             * @return		Locale string for the user.
077:             */
078:            public String getLocale() {
079:                return locale;
080:            }
081:
082:            /**
083:             * Set the locale of the address book user.
084:             *
085:             * @param		Locale string for the user.
086:             */
087:            public void setLocale(String locale) {
088:                this .locale = locale;
089:            }
090:
091:            /**
092:             * Run a search on the address book given the contraints and
093:             * filters specified in the ABFilter argument.
094:             *
095:             * @param abFilter  Definition of the contraints and the filters for the
096:             *                  fetch.
097:             * @return Array of Address Book Element objects.
098:             * @exception ABStoreException if unable to connect to back end service.
099:             * @exception OperationNotSupportedException if the adapter doesnt support the functionality
100:             */
101:            public abstract Element[] fetch(ABFilter abFilter)
102:                    throws ABStoreException, OperationNotSupportedException;
103:
104:            /**
105:             * Add a new Element to the address book.
106:             *
107:             * @param element   The new Element to be added including the unique identifier.
108:             * @exception ABStoreException if unable to connect to back end service.
109:             * @exception OperationNotSupportedException if the adapter doesnt support the functionality
110:             */
111:            public abstract void add(Element element) throws ABStoreException,
112:                    OperationNotSupportedException;
113:
114:            /**
115:             * Modify an Element from the address book.
116:             *
117:             * @param oldElement   The Element in the address book to be replaced.
118:             * @param newElement   The new Element to replace the exisiting element.
119:             * @exception ABStoreException if unable to connect to back end service.
120:             * @exception OperationNotSupportedException if the adapter doesnt support the functionality
121:             */
122:            public abstract void modify(Element oldElement, Element newElement)
123:                    throws ABStoreException, OperationNotSupportedException;
124:
125:            /**
126:             * Delete an Element from the address book.
127:             *
128:             * @param element   The Element to be deleted.
129:             * @exception ABStoreException if unable to connect to back end service.
130:             * @exception OperationNotSupportedException if the adapter doesnt support the functionality
131:             */
132:            public abstract void delete(Element element)
133:                    throws ABStoreException, OperationNotSupportedException;
134:
135:            /**
136:             * Fetch the address book entries in the specified group
137:             *
138:             * @return String array of Elements in the address book.
139:             * @exception ABStoreException if unable to connect to back end service.
140:             * @exception OperationNotSupportedException if the adapter doesnt support the functionality
141:             */
142:            public abstract Element[] fetchGroupMembers(ABFilter filter,
143:                    Group group) throws ABStoreException,
144:                    OperationNotSupportedException;
145:
146:            /**
147:             * Add an element to an existing group in the address book.
148:             *
149:             * @param Element    The Element to be added.
150:             * @param Group    The group to which the element is to be added.
151:             * @exception ABStoreException if unable to connect to back end service.
152:             * @exception OperationNotSupportedException if the adapter doesnt support the functionality
153:             */
154:            public abstract void addGroupMember(Element element, Group group)
155:                    throws ABStoreException, OperationNotSupportedException;
156:
157:            /**
158:             * Delete an element from a group in the address book.
159:             *
160:             * @param element    The Element to be deleted.
161:             * @param group    The Group to which the entry is to be deleted.
162:             * @exception ABStoreException if unable to connect to back end service.
163:             * @exception OperationNotSupportedException if the adapter doesnt support the functionality
164:             */
165:            public abstract void deleteGroupMember(Element element, Group group)
166:                    throws ABStoreException, OperationNotSupportedException;
167:
168:            /**
169:             * Return the ABSearchTerm object corresponding to the service type.
170:             *
171:             * @return ABSearchTerm object corresponding to the service type.
172:             */
173:            public abstract ABSearchTerm newABSearchTerm(String name,
174:                    String value, boolean exact);
175:
176:            /**
177:             * Return the ABSearchTerm object corresponding to the service type.
178:             *
179:             * @return ABSearchTerm object corresponding to the service type.
180:             */
181:            public abstract ABSearchTerm newABSearchTerm(ABSearchTerm term,
182:                    int op) throws ABStoreException;
183:
184:            /**
185:             * Return the ABSearchTerm object corresponding to the service type.
186:             *
187:             * @return ABSearchTerm object corresponding to the service type.
188:             */
189:            public abstract ABSearchTerm newABSearchTerm(ABSearchTerm[] terms,
190:                    int op) throws ABStoreException;
191:
192:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.