Source Code Cross Referenced for PortletType.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » api » portlet » dd » 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 » IDE Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.api.portlet.dd 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0003:         *
0004:         * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
0005:         *
0006:         * The contents of this file are subject to the terms of either the GNU
0007:         * General Public License Version 2 only ("GPL") or the Common
0008:         * Development and Distribution License("CDDL") (collectively, the
0009:         * "License"). You may not use this file except in compliance with the
0010:         * License. You can obtain a copy of the License at
0011:         * http://www.netbeans.org/cddl-gplv2.html
0012:         * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
0013:         * specific language governing permissions and limitations under the
0014:         * License.  When distributing the software, include this License Header
0015:         * Notice in each file and include the License file at
0016:         * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
0017:         * particular file as subject to the "Classpath" exception as provided
0018:         * by Sun in the GPL Version 2 section of the License file that
0019:         * accompanied this code. If applicable, add the following below the
0020:         * License Header, with the fields enclosed by brackets [] replaced by
0021:         * your own identifying information:
0022:         * "Portions Copyrighted [year] [name of copyright owner]"
0023:         *
0024:         * Contributor(s):
0025:         *
0026:         * The Original Software is NetBeans. The Initial Developer of the Original
0027:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
0028:         * Microsystems, Inc. All Rights Reserved.
0029:         *
0030:         * If you wish your version of this file to be governed by only the CDDL
0031:         * or only the GPL Version 2, indicate your decision by adding
0032:         * "[Contributor] elects to include this software in this distribution
0033:         * under the [CDDL or GPL Version 2] license." If you do not indicate a
0034:         * single choice of license, a recipient has the option to distribute
0035:         * your version of this file under either the CDDL, the GPL Version 2 or
0036:         * to extend the choice of license to its licensees as provided above.
0037:         * However, if you add GPL Version 2 code and therefore, elected the GPL
0038:         * Version 2 license, then the option applies only if the new code is
0039:         * made subject to such option by the copyright holder.
0040:         */
0041:        /**
0042:         *	This generated bean class PortletType
0043:         *	matches the schema element 'portletType'.
0044:         *  The root bean class is PortletApp
0045:         *
0046:         *	===============================================================
0047:         *	
0048:         *				The portlet element contains the declarative data of a portlet.
0049:         *				Used in: portlet-app
0050:         *				
0051:         *	===============================================================
0052:         *	Generated on Tue Apr 26 19:08:25 MDT 2005
0053:         * @Generated
0054:         */package org.netbeans.modules.visualweb.api.portlet.dd;
0055:
0056:        public class PortletType
0057:                implements 
0058:                org.netbeans.modules.visualweb.api.portlet.dd.PortletTypeInterface,
0059:                org.netbeans.modules.visualweb.api.portlet.dd.CommonBean {
0060:            public static final String ID = "Id"; // NOI18N
0061:            public static final String DESCRIPTION = "Description"; // NOI18N
0062:            public static final String DESCRIPTIONXMLLANG = "DescriptionXmlLang"; // NOI18N
0063:            public static final String PORTLET_NAME = "PortletName"; // NOI18N
0064:            public static final String DISPLAY_NAME = "DisplayName"; // NOI18N
0065:            public static final String DISPLAYNAMEXMLLANG = "DisplayNameXmlLang"; // NOI18N
0066:            public static final String PORTLET_CLASS = "PortletClass"; // NOI18N
0067:            public static final String INIT_PARAM = "InitParam"; // NOI18N
0068:            public static final String EXPIRATION_CACHE = "ExpirationCache"; // NOI18N
0069:            public static final String SUPPORTS = "Supports"; // NOI18N
0070:            public static final String SUPPORTED_LOCALE = "SupportedLocale"; // NOI18N
0071:            public static final String RESOURCE_BUNDLE = "ResourceBundle"; // NOI18N
0072:            public static final String PORTLET_INFO = "PortletInfo"; // NOI18N
0073:            public static final String PORTLET_INFO2 = "PortletInfo2"; // NOI18N
0074:            public static final String PORTLET_PREFERENCES = "PortletPreferences"; // NOI18N
0075:            public static final String SECURITY_ROLE_REF = "SecurityRoleRef"; // NOI18N
0076:
0077:            private java.lang.String _Id;
0078:            private java.util.List _Description = new java.util.ArrayList(); // List<java.lang.String>
0079:            private java.util.List _DescriptionXmlLang = new java.util.ArrayList(); // List<java.lang.String>
0080:            private java.lang.String _PortletName;
0081:            private java.util.List _DisplayName = new java.util.ArrayList(); // List<java.lang.String>
0082:            private java.util.List _DisplayNameXmlLang = new java.util.ArrayList(); // List<java.lang.String>
0083:            private java.lang.String _PortletClass;
0084:            private java.util.List _InitParam = new java.util.ArrayList(); // List<InitParamType>
0085:            private int _ExpirationCache;
0086:            private java.util.List _Supports = new java.util.ArrayList(); // List<SupportsType>
0087:            private java.util.List _SupportedLocale = new java.util.ArrayList(); // List<java.lang.String>
0088:            private java.lang.String _ResourceBundle;
0089:            private PortletInfoType _PortletInfo;
0090:            private PortletInfoType _PortletInfo2;
0091:            private PortletPreferencesType _PortletPreferences;
0092:            private java.util.List _SecurityRoleRef = new java.util.ArrayList(); // List<SecurityRoleRefType>
0093:
0094:            /**
0095:             * Normal starting point constructor.
0096:             */
0097:            public PortletType() {
0098:                _PortletName = "";
0099:                _PortletClass = "";
0100:                //		_ResourceBundle = "";
0101:            }
0102:
0103:            /**
0104:             * Required parameters constructor
0105:             */
0106:            public PortletType(
0107:                    java.lang.String portletName,
0108:                    java.lang.String portletClass,
0109:                    org.netbeans.modules.visualweb.api.portlet.dd.SupportsType[] supports,
0110:                    java.lang.String resourceBundle) {
0111:                _PortletName = portletName;
0112:                _PortletClass = portletClass;
0113:                if (supports != null) {
0114:                    ((java.util.ArrayList) _Supports)
0115:                            .ensureCapacity(supports.length);
0116:                    for (int i = 0; i < supports.length; ++i) {
0117:                        _Supports.add(supports[i]);
0118:                    }
0119:                }
0120:                _ResourceBundle = resourceBundle;
0121:            }
0122:
0123:            /**
0124:             * Deep copy
0125:             */
0126:            public PortletType(
0127:                    org.netbeans.modules.visualweb.api.portlet.dd.PortletType source) {
0128:                this (source, false);
0129:            }
0130:
0131:            /**
0132:             * Deep copy
0133:             * @param justData just copy the XML relevant data
0134:             */
0135:            public PortletType(
0136:                    org.netbeans.modules.visualweb.api.portlet.dd.PortletType source,
0137:                    boolean justData) {
0138:                _Id = source._Id;
0139:                for (java.util.Iterator it = source._Description.iterator(); it
0140:                        .hasNext();) {
0141:                    java.lang.String srcElement = (java.lang.String) it.next();
0142:                    _Description.add(srcElement);
0143:                }
0144:                for (java.util.Iterator it = source._DescriptionXmlLang
0145:                        .iterator(); it.hasNext();) {
0146:                    java.lang.String srcElement = (java.lang.String) it.next();
0147:                    _DescriptionXmlLang.add(srcElement);
0148:                }
0149:                _PortletName = source._PortletName;
0150:                for (java.util.Iterator it = source._DisplayName.iterator(); it
0151:                        .hasNext();) {
0152:                    java.lang.String srcElement = (java.lang.String) it.next();
0153:                    _DisplayName.add(srcElement);
0154:                }
0155:                for (java.util.Iterator it = source._DisplayNameXmlLang
0156:                        .iterator(); it.hasNext();) {
0157:                    java.lang.String srcElement = (java.lang.String) it.next();
0158:                    _DisplayNameXmlLang.add(srcElement);
0159:                }
0160:                _PortletClass = source._PortletClass;
0161:                for (java.util.Iterator it = source._InitParam.iterator(); it
0162:                        .hasNext();) {
0163:                    org.netbeans.modules.visualweb.api.portlet.dd.InitParamType srcElement = (org.netbeans.modules.visualweb.api.portlet.dd.InitParamType) it
0164:                            .next();
0165:                    _InitParam.add((srcElement == null) ? null
0166:                            : newInitParamType(srcElement, justData));
0167:                }
0168:                _ExpirationCache = source._ExpirationCache;
0169:                for (java.util.Iterator it = source._Supports.iterator(); it
0170:                        .hasNext();) {
0171:                    org.netbeans.modules.visualweb.api.portlet.dd.SupportsType srcElement = (org.netbeans.modules.visualweb.api.portlet.dd.SupportsType) it
0172:                            .next();
0173:                    _Supports.add((srcElement == null) ? null
0174:                            : newSupportsType(srcElement, justData));
0175:                }
0176:                for (java.util.Iterator it = source._SupportedLocale.iterator(); it
0177:                        .hasNext();) {
0178:                    java.lang.String srcElement = (java.lang.String) it.next();
0179:                    _SupportedLocale.add(srcElement);
0180:                }
0181:                _ResourceBundle = source._ResourceBundle;
0182:                _PortletInfo = (source._PortletInfo == null) ? null
0183:                        : newPortletInfoType(source._PortletInfo, justData);
0184:                _PortletInfo2 = (source._PortletInfo2 == null) ? null
0185:                        : newPortletInfoType(source._PortletInfo2, justData);
0186:                _PortletPreferences = (source._PortletPreferences == null) ? null
0187:                        : newPortletPreferencesType(source._PortletPreferences,
0188:                                justData);
0189:                for (java.util.Iterator it = source._SecurityRoleRef.iterator(); it
0190:                        .hasNext();) {
0191:                    org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType srcElement = (org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType) it
0192:                            .next();
0193:                    _SecurityRoleRef.add((srcElement == null) ? null
0194:                            : newSecurityRoleRefType(srcElement, justData));
0195:                }
0196:            }
0197:
0198:            // This attribute is optional
0199:            public void setId(java.lang.String value) {
0200:                _Id = value;
0201:            }
0202:
0203:            public java.lang.String getId() {
0204:                return _Id;
0205:            }
0206:
0207:            // This attribute is an array, possibly empty
0208:            public void setDescription(java.lang.String[] value) {
0209:                if (value == null)
0210:                    value = new java.lang.String[0];
0211:                _Description.clear();
0212:                ((java.util.ArrayList) _Description)
0213:                        .ensureCapacity(value.length);
0214:                for (int i = 0; i < value.length; ++i) {
0215:                    _Description.add(value[i]);
0216:                }
0217:            }
0218:
0219:            public void setDescription(int index, java.lang.String value) {
0220:                _Description.set(index, value);
0221:            }
0222:
0223:            public java.lang.String[] getDescription() {
0224:                java.lang.String[] arr = new java.lang.String[_Description
0225:                        .size()];
0226:                return (java.lang.String[]) _Description.toArray(arr);
0227:            }
0228:
0229:            public java.util.List fetchDescriptionList() {
0230:                return _Description;
0231:            }
0232:
0233:            public java.lang.String getDescription(int index) {
0234:                return (java.lang.String) _Description.get(index);
0235:            }
0236:
0237:            // Return the number of description
0238:            public int sizeDescription() {
0239:                return _Description.size();
0240:            }
0241:
0242:            public int addDescription(java.lang.String value) {
0243:                _Description.add(value);
0244:                int positionOfNewItem = _Description.size() - 1;
0245:                return positionOfNewItem;
0246:            }
0247:
0248:            /**
0249:             * Search from the end looking for @param value, and then remove it.
0250:             */
0251:            public int removeDescription(java.lang.String value) {
0252:                int pos = _Description.indexOf(value);
0253:                if (pos >= 0) {
0254:                    _Description.remove(pos);
0255:                }
0256:                return pos;
0257:            }
0258:
0259:            // This attribute is an array, possibly empty
0260:            public void setDescriptionXmlLang(java.lang.String[] value) {
0261:                if (value == null)
0262:                    value = new java.lang.String[0];
0263:                _DescriptionXmlLang.clear();
0264:                ((java.util.ArrayList) _DescriptionXmlLang)
0265:                        .ensureCapacity(value.length);
0266:                for (int i = 0; i < value.length; ++i) {
0267:                    _DescriptionXmlLang.add(value[i]);
0268:                }
0269:            }
0270:
0271:            public void setDescriptionXmlLang(int index, java.lang.String value) {
0272:                for (int size = _DescriptionXmlLang.size(); index >= size; ++size) {
0273:                    _DescriptionXmlLang.add(null);
0274:                }
0275:                _DescriptionXmlLang.set(index, value);
0276:            }
0277:
0278:            public java.lang.String[] getDescriptionXmlLang() {
0279:                java.lang.String[] arr = new java.lang.String[_DescriptionXmlLang
0280:                        .size()];
0281:                return (java.lang.String[]) _DescriptionXmlLang.toArray(arr);
0282:            }
0283:
0284:            public java.util.List fetchDescriptionXmlLangList() {
0285:                return _DescriptionXmlLang;
0286:            }
0287:
0288:            public java.lang.String getDescriptionXmlLang(int index) {
0289:                return (java.lang.String) _DescriptionXmlLang.get(index);
0290:            }
0291:
0292:            // Return the number of descriptionXmlLang
0293:            public int sizeDescriptionXmlLang() {
0294:                return _DescriptionXmlLang.size();
0295:            }
0296:
0297:            public int addDescriptionXmlLang(java.lang.String value) {
0298:                _DescriptionXmlLang.add(value);
0299:                int positionOfNewItem = _DescriptionXmlLang.size() - 1;
0300:                return positionOfNewItem;
0301:            }
0302:
0303:            /**
0304:             * Search from the end looking for @param value, and then remove it.
0305:             */
0306:            public int removeDescriptionXmlLang(java.lang.String value) {
0307:                int pos = _DescriptionXmlLang.indexOf(value);
0308:                if (pos >= 0) {
0309:                    _DescriptionXmlLang.remove(pos);
0310:                }
0311:                return pos;
0312:            }
0313:
0314:            // This attribute is mandatory
0315:            public void setPortletName(java.lang.String value) {
0316:                _PortletName = value;
0317:            }
0318:
0319:            public java.lang.String getPortletName() {
0320:                return _PortletName;
0321:            }
0322:
0323:            // This attribute is an array, possibly empty
0324:            public void setDisplayName(java.lang.String[] value) {
0325:                if (value == null)
0326:                    value = new java.lang.String[0];
0327:                _DisplayName.clear();
0328:                ((java.util.ArrayList) _DisplayName)
0329:                        .ensureCapacity(value.length);
0330:                for (int i = 0; i < value.length; ++i) {
0331:                    _DisplayName.add(value[i]);
0332:                }
0333:            }
0334:
0335:            public void setDisplayName(int index, java.lang.String value) {
0336:                _DisplayName.set(index, value);
0337:            }
0338:
0339:            public java.lang.String[] getDisplayName() {
0340:                java.lang.String[] arr = new java.lang.String[_DisplayName
0341:                        .size()];
0342:                return (java.lang.String[]) _DisplayName.toArray(arr);
0343:            }
0344:
0345:            public java.util.List fetchDisplayNameList() {
0346:                return _DisplayName;
0347:            }
0348:
0349:            public java.lang.String getDisplayName(int index) {
0350:                return (java.lang.String) _DisplayName.get(index);
0351:            }
0352:
0353:            // Return the number of displayName
0354:            public int sizeDisplayName() {
0355:                return _DisplayName.size();
0356:            }
0357:
0358:            public int addDisplayName(java.lang.String value) {
0359:                _DisplayName.add(value);
0360:                int positionOfNewItem = _DisplayName.size() - 1;
0361:                return positionOfNewItem;
0362:            }
0363:
0364:            /**
0365:             * Search from the end looking for @param value, and then remove it.
0366:             */
0367:            public int removeDisplayName(java.lang.String value) {
0368:                int pos = _DisplayName.indexOf(value);
0369:                if (pos >= 0) {
0370:                    _DisplayName.remove(pos);
0371:                }
0372:                return pos;
0373:            }
0374:
0375:            // This attribute is an array, possibly empty
0376:            public void setDisplayNameXmlLang(java.lang.String[] value) {
0377:                if (value == null)
0378:                    value = new java.lang.String[0];
0379:                _DisplayNameXmlLang.clear();
0380:                ((java.util.ArrayList) _DisplayNameXmlLang)
0381:                        .ensureCapacity(value.length);
0382:                for (int i = 0; i < value.length; ++i) {
0383:                    _DisplayNameXmlLang.add(value[i]);
0384:                }
0385:            }
0386:
0387:            public void setDisplayNameXmlLang(int index, java.lang.String value) {
0388:                for (int size = _DisplayNameXmlLang.size(); index >= size; ++size) {
0389:                    _DisplayNameXmlLang.add(null);
0390:                }
0391:                _DisplayNameXmlLang.set(index, value);
0392:            }
0393:
0394:            public java.lang.String[] getDisplayNameXmlLang() {
0395:                java.lang.String[] arr = new java.lang.String[_DisplayNameXmlLang
0396:                        .size()];
0397:                return (java.lang.String[]) _DisplayNameXmlLang.toArray(arr);
0398:            }
0399:
0400:            public java.util.List fetchDisplayNameXmlLangList() {
0401:                return _DisplayNameXmlLang;
0402:            }
0403:
0404:            public java.lang.String getDisplayNameXmlLang(int index) {
0405:                return (java.lang.String) _DisplayNameXmlLang.get(index);
0406:            }
0407:
0408:            // Return the number of displayNameXmlLang
0409:            public int sizeDisplayNameXmlLang() {
0410:                return _DisplayNameXmlLang.size();
0411:            }
0412:
0413:            public int addDisplayNameXmlLang(java.lang.String value) {
0414:                _DisplayNameXmlLang.add(value);
0415:                int positionOfNewItem = _DisplayNameXmlLang.size() - 1;
0416:                return positionOfNewItem;
0417:            }
0418:
0419:            /**
0420:             * Search from the end looking for @param value, and then remove it.
0421:             */
0422:            public int removeDisplayNameXmlLang(java.lang.String value) {
0423:                int pos = _DisplayNameXmlLang.indexOf(value);
0424:                if (pos >= 0) {
0425:                    _DisplayNameXmlLang.remove(pos);
0426:                }
0427:                return pos;
0428:            }
0429:
0430:            // This attribute is mandatory
0431:            public void setPortletClass(java.lang.String value) {
0432:                _PortletClass = value;
0433:            }
0434:
0435:            public java.lang.String getPortletClass() {
0436:                return _PortletClass;
0437:            }
0438:
0439:            // This attribute is an array, possibly empty
0440:            public void setInitParam(
0441:                    org.netbeans.modules.visualweb.api.portlet.dd.InitParamType[] value) {
0442:                if (value == null)
0443:                    value = new InitParamType[0];
0444:                _InitParam.clear();
0445:                ((java.util.ArrayList) _InitParam).ensureCapacity(value.length);
0446:                for (int i = 0; i < value.length; ++i) {
0447:                    _InitParam.add(value[i]);
0448:                }
0449:            }
0450:
0451:            public void setInitParam(
0452:                    int index,
0453:                    org.netbeans.modules.visualweb.api.portlet.dd.InitParamType value) {
0454:                _InitParam.set(index, value);
0455:            }
0456:
0457:            public org.netbeans.modules.visualweb.api.portlet.dd.InitParamType[] getInitParam() {
0458:                InitParamType[] arr = new InitParamType[_InitParam.size()];
0459:                return (InitParamType[]) _InitParam.toArray(arr);
0460:            }
0461:
0462:            public java.util.List fetchInitParamList() {
0463:                return _InitParam;
0464:            }
0465:
0466:            public org.netbeans.modules.visualweb.api.portlet.dd.InitParamType getInitParam(
0467:                    int index) {
0468:                return (InitParamType) _InitParam.get(index);
0469:            }
0470:
0471:            // Return the number of initParam
0472:            public int sizeInitParam() {
0473:                return _InitParam.size();
0474:            }
0475:
0476:            public int addInitParam(
0477:                    org.netbeans.modules.visualweb.api.portlet.dd.InitParamType value) {
0478:                _InitParam.add(value);
0479:                int positionOfNewItem = _InitParam.size() - 1;
0480:                return positionOfNewItem;
0481:            }
0482:
0483:            /**
0484:             * Search from the end looking for @param value, and then remove it.
0485:             */
0486:            public int removeInitParam(
0487:                    org.netbeans.modules.visualweb.api.portlet.dd.InitParamType value) {
0488:                int pos = _InitParam.indexOf(value);
0489:                if (pos >= 0) {
0490:                    _InitParam.remove(pos);
0491:                }
0492:                return pos;
0493:            }
0494:
0495:            // This attribute is optional
0496:            public void setExpirationCache(int value) {
0497:                _ExpirationCache = value;
0498:            }
0499:
0500:            public int getExpirationCache() {
0501:                return _ExpirationCache;
0502:            }
0503:
0504:            // This attribute is an array containing at least one element
0505:            public void setSupports(
0506:                    org.netbeans.modules.visualweb.api.portlet.dd.SupportsType[] value) {
0507:                if (value == null)
0508:                    value = new SupportsType[0];
0509:                _Supports.clear();
0510:                ((java.util.ArrayList) _Supports).ensureCapacity(value.length);
0511:                for (int i = 0; i < value.length; ++i) {
0512:                    _Supports.add(value[i]);
0513:                }
0514:            }
0515:
0516:            public void setSupports(
0517:                    int index,
0518:                    org.netbeans.modules.visualweb.api.portlet.dd.SupportsType value) {
0519:                _Supports.set(index, value);
0520:            }
0521:
0522:            public org.netbeans.modules.visualweb.api.portlet.dd.SupportsType[] getSupports() {
0523:                SupportsType[] arr = new SupportsType[_Supports.size()];
0524:                return (SupportsType[]) _Supports.toArray(arr);
0525:            }
0526:
0527:            public java.util.List fetchSupportsList() {
0528:                return _Supports;
0529:            }
0530:
0531:            public org.netbeans.modules.visualweb.api.portlet.dd.SupportsType getSupports(
0532:                    int index) {
0533:                return (SupportsType) _Supports.get(index);
0534:            }
0535:
0536:            // Return the number of supports
0537:            public int sizeSupports() {
0538:                return _Supports.size();
0539:            }
0540:
0541:            public int addSupports(
0542:                    org.netbeans.modules.visualweb.api.portlet.dd.SupportsType value) {
0543:                _Supports.add(value);
0544:                int positionOfNewItem = _Supports.size() - 1;
0545:                return positionOfNewItem;
0546:            }
0547:
0548:            /**
0549:             * Search from the end looking for @param value, and then remove it.
0550:             */
0551:            public int removeSupports(
0552:                    org.netbeans.modules.visualweb.api.portlet.dd.SupportsType value) {
0553:                int pos = _Supports.indexOf(value);
0554:                if (pos >= 0) {
0555:                    _Supports.remove(pos);
0556:                }
0557:                return pos;
0558:            }
0559:
0560:            // This attribute is an array, possibly empty
0561:            public void setSupportedLocale(java.lang.String[] value) {
0562:                if (value == null)
0563:                    value = new java.lang.String[0];
0564:                _SupportedLocale.clear();
0565:                ((java.util.ArrayList) _SupportedLocale)
0566:                        .ensureCapacity(value.length);
0567:                for (int i = 0; i < value.length; ++i) {
0568:                    _SupportedLocale.add(value[i]);
0569:                }
0570:            }
0571:
0572:            public void setSupportedLocale(int index, java.lang.String value) {
0573:                _SupportedLocale.set(index, value);
0574:            }
0575:
0576:            public java.lang.String[] getSupportedLocale() {
0577:                java.lang.String[] arr = new java.lang.String[_SupportedLocale
0578:                        .size()];
0579:                return (java.lang.String[]) _SupportedLocale.toArray(arr);
0580:            }
0581:
0582:            public java.util.List fetchSupportedLocaleList() {
0583:                return _SupportedLocale;
0584:            }
0585:
0586:            public java.lang.String getSupportedLocale(int index) {
0587:                return (java.lang.String) _SupportedLocale.get(index);
0588:            }
0589:
0590:            // Return the number of supportedLocale
0591:            public int sizeSupportedLocale() {
0592:                return _SupportedLocale.size();
0593:            }
0594:
0595:            public int addSupportedLocale(java.lang.String value) {
0596:                _SupportedLocale.add(value);
0597:                int positionOfNewItem = _SupportedLocale.size() - 1;
0598:                return positionOfNewItem;
0599:            }
0600:
0601:            /**
0602:             * Search from the end looking for @param value, and then remove it.
0603:             */
0604:            public int removeSupportedLocale(java.lang.String value) {
0605:                int pos = _SupportedLocale.indexOf(value);
0606:                if (pos >= 0) {
0607:                    _SupportedLocale.remove(pos);
0608:                }
0609:                return pos;
0610:            }
0611:
0612:            // This attribute is mandatory
0613:            public void setResourceBundle(java.lang.String value) {
0614:                _ResourceBundle = value;
0615:            }
0616:
0617:            public java.lang.String getResourceBundle() {
0618:                return _ResourceBundle;
0619:            }
0620:
0621:            // This attribute is optional
0622:            public void setPortletInfo(
0623:                    org.netbeans.modules.visualweb.api.portlet.dd.PortletInfoType value) {
0624:                _PortletInfo = value;
0625:            }
0626:
0627:            public org.netbeans.modules.visualweb.api.portlet.dd.PortletInfoType getPortletInfo() {
0628:                return _PortletInfo;
0629:            }
0630:
0631:            // This attribute is mandatory
0632:            public void setPortletInfo2(
0633:                    org.netbeans.modules.visualweb.api.portlet.dd.PortletInfoType value) {
0634:                _PortletInfo2 = value;
0635:                if (value != null) {
0636:                    // It's a mutually exclusive property.
0637:                    setResourceBundle(null);
0638:                    setPortletInfo(null);
0639:                }
0640:            }
0641:
0642:            public org.netbeans.modules.visualweb.api.portlet.dd.PortletInfoType getPortletInfo2() {
0643:                return _PortletInfo2;
0644:            }
0645:
0646:            // This attribute is optional
0647:            public void setPortletPreferences(
0648:                    org.netbeans.modules.visualweb.api.portlet.dd.PortletPreferencesType value) {
0649:                _PortletPreferences = value;
0650:            }
0651:
0652:            public org.netbeans.modules.visualweb.api.portlet.dd.PortletPreferencesType getPortletPreferences() {
0653:                return _PortletPreferences;
0654:            }
0655:
0656:            // This attribute is an array, possibly empty
0657:            public void setSecurityRoleRef(
0658:                    org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType[] value) {
0659:                if (value == null)
0660:                    value = new SecurityRoleRefType[0];
0661:                _SecurityRoleRef.clear();
0662:                ((java.util.ArrayList) _SecurityRoleRef)
0663:                        .ensureCapacity(value.length);
0664:                for (int i = 0; i < value.length; ++i) {
0665:                    _SecurityRoleRef.add(value[i]);
0666:                }
0667:            }
0668:
0669:            public void setSecurityRoleRef(
0670:                    int index,
0671:                    org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType value) {
0672:                _SecurityRoleRef.set(index, value);
0673:            }
0674:
0675:            public org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType[] getSecurityRoleRef() {
0676:                SecurityRoleRefType[] arr = new SecurityRoleRefType[_SecurityRoleRef
0677:                        .size()];
0678:                return (SecurityRoleRefType[]) _SecurityRoleRef.toArray(arr);
0679:            }
0680:
0681:            public java.util.List fetchSecurityRoleRefList() {
0682:                return _SecurityRoleRef;
0683:            }
0684:
0685:            public org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType getSecurityRoleRef(
0686:                    int index) {
0687:                return (SecurityRoleRefType) _SecurityRoleRef.get(index);
0688:            }
0689:
0690:            // Return the number of securityRoleRef
0691:            public int sizeSecurityRoleRef() {
0692:                return _SecurityRoleRef.size();
0693:            }
0694:
0695:            public int addSecurityRoleRef(
0696:                    org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType value) {
0697:                _SecurityRoleRef.add(value);
0698:                int positionOfNewItem = _SecurityRoleRef.size() - 1;
0699:                return positionOfNewItem;
0700:            }
0701:
0702:            /**
0703:             * Search from the end looking for @param value, and then remove it.
0704:             */
0705:            public int removeSecurityRoleRef(
0706:                    org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType value) {
0707:                int pos = _SecurityRoleRef.indexOf(value);
0708:                if (pos >= 0) {
0709:                    _SecurityRoleRef.remove(pos);
0710:                }
0711:                return pos;
0712:            }
0713:
0714:            /**
0715:             * Create a new bean using it's default constructor.
0716:             * This does not add it to any bean graph.
0717:             */
0718:            public org.netbeans.modules.visualweb.api.portlet.dd.InitParamType newInitParamType() {
0719:                return new org.netbeans.modules.visualweb.api.portlet.dd.InitParamType();
0720:            }
0721:
0722:            /**
0723:             * Create a new bean, copying from another one.
0724:             * This does not add it to any bean graph.
0725:             */
0726:            public org.netbeans.modules.visualweb.api.portlet.dd.InitParamType newInitParamType(
0727:                    InitParamType source, boolean justData) {
0728:                return new org.netbeans.modules.visualweb.api.portlet.dd.InitParamType(
0729:                        source, justData);
0730:            }
0731:
0732:            /**
0733:             * Create a new bean using it's default constructor.
0734:             * This does not add it to any bean graph.
0735:             */
0736:            public org.netbeans.modules.visualweb.api.portlet.dd.SupportsType newSupportsType() {
0737:                return new org.netbeans.modules.visualweb.api.portlet.dd.SupportsType();
0738:            }
0739:
0740:            /**
0741:             * Create a new bean, copying from another one.
0742:             * This does not add it to any bean graph.
0743:             */
0744:            public org.netbeans.modules.visualweb.api.portlet.dd.SupportsType newSupportsType(
0745:                    SupportsType source, boolean justData) {
0746:                return new org.netbeans.modules.visualweb.api.portlet.dd.SupportsType(
0747:                        source, justData);
0748:            }
0749:
0750:            /**
0751:             * Create a new bean using it's default constructor.
0752:             * This does not add it to any bean graph.
0753:             */
0754:            public org.netbeans.modules.visualweb.api.portlet.dd.PortletInfoType newPortletInfoType() {
0755:                return new org.netbeans.modules.visualweb.api.portlet.dd.PortletInfoType();
0756:            }
0757:
0758:            /**
0759:             * Create a new bean, copying from another one.
0760:             * This does not add it to any bean graph.
0761:             */
0762:            public org.netbeans.modules.visualweb.api.portlet.dd.PortletInfoType newPortletInfoType(
0763:                    PortletInfoType source, boolean justData) {
0764:                return new org.netbeans.modules.visualweb.api.portlet.dd.PortletInfoType(
0765:                        source, justData);
0766:            }
0767:
0768:            /**
0769:             * Create a new bean using it's default constructor.
0770:             * This does not add it to any bean graph.
0771:             */
0772:            public org.netbeans.modules.visualweb.api.portlet.dd.PortletPreferencesType newPortletPreferencesType() {
0773:                return new org.netbeans.modules.visualweb.api.portlet.dd.PortletPreferencesType();
0774:            }
0775:
0776:            /**
0777:             * Create a new bean, copying from another one.
0778:             * This does not add it to any bean graph.
0779:             */
0780:            public org.netbeans.modules.visualweb.api.portlet.dd.PortletPreferencesType newPortletPreferencesType(
0781:                    PortletPreferencesType source, boolean justData) {
0782:                return new org.netbeans.modules.visualweb.api.portlet.dd.PortletPreferencesType(
0783:                        source, justData);
0784:            }
0785:
0786:            /**
0787:             * Create a new bean using it's default constructor.
0788:             * This does not add it to any bean graph.
0789:             */
0790:            public org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType newSecurityRoleRefType() {
0791:                return new org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType();
0792:            }
0793:
0794:            /**
0795:             * Create a new bean, copying from another one.
0796:             * This does not add it to any bean graph.
0797:             */
0798:            public org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType newSecurityRoleRefType(
0799:                    SecurityRoleRefType source, boolean justData) {
0800:                return new org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType(
0801:                        source, justData);
0802:            }
0803:
0804:            public void writeNode(java.io.Writer out)
0805:                    throws java.io.IOException {
0806:                String myName;
0807:                myName = "portletType";
0808:                writeNode(out, myName, ""); // NOI18N
0809:            }
0810:
0811:            public void writeNode(java.io.Writer out, String nodeName,
0812:                    String indent) throws java.io.IOException {
0813:                writeNode(out, nodeName, null, indent, new java.util.HashMap());
0814:            }
0815:
0816:            /**
0817:             * It's not recommended to call this method directly.
0818:             */
0819:            public void writeNode(java.io.Writer out, String nodeName,
0820:                    String namespace, String indent, java.util.Map namespaceMap)
0821:                    throws java.io.IOException {
0822:                out.write(indent);
0823:                out.write("<");
0824:                if (namespace != null) {
0825:                    out.write((String) namespaceMap.get(namespace));
0826:                    out.write(":");
0827:                }
0828:                out.write(nodeName);
0829:                // id is an attribute with namespace http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
0830:                if (_Id != null) {
0831:                    out.write(" id='");
0832:                    org.netbeans.modules.visualweb.api.portlet.dd.PortletApp
0833:                            .writeXML(out, _Id, true);
0834:                    out.write("'"); // NOI18N
0835:                }
0836:                out.write(">\n");
0837:                String nextIndent = indent + "	";
0838:                int index = 0;
0839:                for (java.util.Iterator it = _Description.iterator(); it
0840:                        .hasNext();) {
0841:                    java.lang.String element = (java.lang.String) it.next();
0842:                    if (element != null) {
0843:                        out.write(nextIndent);
0844:                        out.write("<description"); // NOI18N
0845:                        if (index < sizeDescriptionXmlLang()) {
0846:                            // xml:lang is an attribute with namespace http://www.w3.org/XML/1998/namespace
0847:                            if (getDescriptionXmlLang(index) != null) {
0848:                                out.write(" xml:lang='");
0849:                                org.netbeans.modules.visualweb.api.portlet.dd.PortletApp
0850:                                        .writeXML(out,
0851:                                                getDescriptionXmlLang(index),
0852:                                                true);
0853:                                out.write("'"); // NOI18N
0854:                            }
0855:                        }
0856:                        out.write(">"); // NOI18N
0857:                        org.netbeans.modules.visualweb.api.portlet.dd.PortletApp
0858:                                .writeXML(out, element, false);
0859:                        out.write("</description>\n"); // NOI18N
0860:                    }
0861:                    ++index;
0862:                }
0863:                if (_PortletName != null) {
0864:                    out.write(nextIndent);
0865:                    out.write("<portlet-name"); // NOI18N
0866:                    out.write(">"); // NOI18N
0867:                    org.netbeans.modules.visualweb.api.portlet.dd.PortletApp
0868:                            .writeXML(out, _PortletName, false);
0869:                    out.write("</portlet-name>\n"); // NOI18N
0870:                }
0871:                index = 0;
0872:                for (java.util.Iterator it = _DisplayName.iterator(); it
0873:                        .hasNext();) {
0874:                    java.lang.String element = (java.lang.String) it.next();
0875:                    if (element != null) {
0876:                        out.write(nextIndent);
0877:                        out.write("<display-name"); // NOI18N
0878:                        if (index < sizeDisplayNameXmlLang()) {
0879:                            // xml:lang is an attribute with namespace http://www.w3.org/XML/1998/namespace
0880:                            if (getDisplayNameXmlLang(index) != null) {
0881:                                out.write(" xml:lang='");
0882:                                org.netbeans.modules.visualweb.api.portlet.dd.PortletApp
0883:                                        .writeXML(out,
0884:                                                getDisplayNameXmlLang(index),
0885:                                                true);
0886:                                out.write("'"); // NOI18N
0887:                            }
0888:                        }
0889:                        out.write(">"); // NOI18N
0890:                        org.netbeans.modules.visualweb.api.portlet.dd.PortletApp
0891:                                .writeXML(out, element, false);
0892:                        out.write("</display-name>\n"); // NOI18N
0893:                    }
0894:                    ++index;
0895:                }
0896:                if (_PortletClass != null) {
0897:                    out.write(nextIndent);
0898:                    out.write("<portlet-class"); // NOI18N
0899:                    out.write(">"); // NOI18N
0900:                    org.netbeans.modules.visualweb.api.portlet.dd.PortletApp
0901:                            .writeXML(out, _PortletClass, false);
0902:                    out.write("</portlet-class>\n"); // NOI18N
0903:                }
0904:                for (java.util.Iterator it = _InitParam.iterator(); it
0905:                        .hasNext();) {
0906:                    org.netbeans.modules.visualweb.api.portlet.dd.InitParamType element = (org.netbeans.modules.visualweb.api.portlet.dd.InitParamType) it
0907:                            .next();
0908:                    if (element != null) {
0909:                        element.writeNode(out, "init-param", null, nextIndent,
0910:                                namespaceMap);
0911:                    }
0912:                }
0913:                out.write(nextIndent);
0914:                out.write("<expiration-cache"); // NOI18N
0915:                out.write(">"); // NOI18N
0916:                out.write("" + _ExpirationCache);
0917:                out.write("</expiration-cache>\n"); // NOI18N
0918:                for (java.util.Iterator it = _Supports.iterator(); it.hasNext();) {
0919:                    org.netbeans.modules.visualweb.api.portlet.dd.SupportsType element = (org.netbeans.modules.visualweb.api.portlet.dd.SupportsType) it
0920:                            .next();
0921:                    if (element != null) {
0922:                        element.writeNode(out, "supports", null, nextIndent,
0923:                                namespaceMap);
0924:                    }
0925:                }
0926:                for (java.util.Iterator it = _SupportedLocale.iterator(); it
0927:                        .hasNext();) {
0928:                    java.lang.String element = (java.lang.String) it.next();
0929:                    if (element != null) {
0930:                        out.write(nextIndent);
0931:                        out.write("<supported-locale"); // NOI18N
0932:                        out.write(">"); // NOI18N
0933:                        org.netbeans.modules.visualweb.api.portlet.dd.PortletApp
0934:                                .writeXML(out, element, false);
0935:                        out.write("</supported-locale>\n"); // NOI18N
0936:                    }
0937:                }
0938:                if (_ResourceBundle != null) {
0939:                    out.write(nextIndent);
0940:                    out.write("<resource-bundle"); // NOI18N
0941:                    out.write(">"); // NOI18N
0942:                    org.netbeans.modules.visualweb.api.portlet.dd.PortletApp
0943:                            .writeXML(out, _ResourceBundle, false);
0944:                    out.write("</resource-bundle>\n"); // NOI18N
0945:                }
0946:                if (_PortletInfo != null) {
0947:                    _PortletInfo.writeNode(out, "portlet-info", null,
0948:                            nextIndent, namespaceMap);
0949:                }
0950:                if (_PortletInfo2 != null) {
0951:                    _PortletInfo2.writeNode(out, "portlet-info", null,
0952:                            nextIndent, namespaceMap);
0953:                }
0954:                if (_PortletPreferences != null) {
0955:                    _PortletPreferences.writeNode(out, "portlet-preferences",
0956:                            null, nextIndent, namespaceMap);
0957:                }
0958:                for (java.util.Iterator it = _SecurityRoleRef.iterator(); it
0959:                        .hasNext();) {
0960:                    org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType element = (org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType) it
0961:                            .next();
0962:                    if (element != null) {
0963:                        element.writeNode(out, "security-role-ref", null,
0964:                                nextIndent, namespaceMap);
0965:                    }
0966:                }
0967:                out.write(indent);
0968:                out.write("</");
0969:                if (namespace != null) {
0970:                    out.write((String) namespaceMap.get(namespace));
0971:                    out.write(":");
0972:                }
0973:                out.write(nodeName);
0974:                out.write(">\n");
0975:            }
0976:
0977:            public void readNode(org.w3c.dom.Node node) {
0978:                readNode(node, new java.util.HashMap());
0979:            }
0980:
0981:            public void readNode(org.w3c.dom.Node node,
0982:                    java.util.Map namespacePrefixes) {
0983:                if (node.hasAttributes()) {
0984:                    org.w3c.dom.NamedNodeMap attrs = node.getAttributes();
0985:                    org.w3c.dom.Attr attr;
0986:                    java.lang.String attrValue;
0987:                    boolean firstNamespaceDef = true;
0988:                    for (int attrNum = 0; attrNum < attrs.getLength(); ++attrNum) {
0989:                        attr = (org.w3c.dom.Attr) attrs.item(attrNum);
0990:                        String attrName = attr.getName();
0991:                        if (attrName.startsWith("xmlns:")) {
0992:                            if (firstNamespaceDef) {
0993:                                firstNamespaceDef = false;
0994:                                // Dup prefix map, so as to not write over previous values, and to make it easy to clear out our entries.
0995:                                namespacePrefixes = new java.util.HashMap(
0996:                                        namespacePrefixes);
0997:                            }
0998:                            String attrNSPrefix = attrName.substring(6,
0999:                                    attrName.length());
1000:                            namespacePrefixes
1001:                                    .put(attrNSPrefix, attr.getValue());
1002:                        }
1003:                    }
1004:                    attr = (org.w3c.dom.Attr) attrs.getNamedItem("id");
1005:                    if (attr != null) {
1006:                        attrValue = attr.getValue();
1007:                        _Id = attrValue;
1008:                    }
1009:                }
1010:                org.w3c.dom.NodeList children = node.getChildNodes();
1011:                int lastElementType = -1;
1012:                for (int i = 0, size = children.getLength(); i < size; ++i) {
1013:                    org.w3c.dom.Node childNode = children.item(i);
1014:                    String childNodeName = (childNode.getLocalName() == null ? childNode
1015:                            .getNodeName().intern()
1016:                            : childNode.getLocalName().intern());
1017:                    String childNodeValue = "";
1018:                    if (childNode.getFirstChild() != null) {
1019:                        childNodeValue = childNode.getFirstChild()
1020:                                .getNodeValue();
1021:                    }
1022:                    org.w3c.dom.NamedNodeMap attrs = childNode.getAttributes();
1023:                    org.w3c.dom.Attr attr;
1024:                    java.lang.String attrValue;
1025:                    if (childNodeName == "description") {
1026:                        java.lang.String aDescription;
1027:                        aDescription = childNodeValue;
1028:                        attr = (org.w3c.dom.Attr) attrs
1029:                                .getNamedItem("xml:lang");
1030:                        if (attr != null) {
1031:                            attrValue = attr.getValue();
1032:                        } else {
1033:                            attrValue = null;
1034:                        }
1035:                        java.lang.String processedValueFor_DescriptionXmlLang;
1036:                        processedValueFor_DescriptionXmlLang = attrValue;
1037:                        addDescriptionXmlLang(processedValueFor_DescriptionXmlLang);
1038:                        _Description.add(aDescription);
1039:                        lastElementType = 1;
1040:                    } else if (childNodeName == "portlet-name") {
1041:                        _PortletName = childNodeValue;
1042:                        lastElementType = 3;
1043:                    } else if (childNodeName == "display-name") {
1044:                        java.lang.String aDisplayName;
1045:                        aDisplayName = childNodeValue;
1046:                        attr = (org.w3c.dom.Attr) attrs
1047:                                .getNamedItem("xml:lang");
1048:                        if (attr != null) {
1049:                            attrValue = attr.getValue();
1050:                        } else {
1051:                            attrValue = null;
1052:                        }
1053:                        java.lang.String processedValueFor_DisplayNameXmlLang;
1054:                        processedValueFor_DisplayNameXmlLang = attrValue;
1055:                        addDisplayNameXmlLang(processedValueFor_DisplayNameXmlLang);
1056:                        _DisplayName.add(aDisplayName);
1057:                        lastElementType = 4;
1058:                    } else if (childNodeName == "portlet-class") {
1059:                        _PortletClass = childNodeValue;
1060:                        lastElementType = 6;
1061:                    } else if (childNodeName == "init-param") {
1062:                        InitParamType aInitParam = newInitParamType();
1063:                        aInitParam.readNode(childNode, namespacePrefixes);
1064:                        _InitParam.add(aInitParam);
1065:                        lastElementType = 7;
1066:                    } else if (childNodeName == "expiration-cache") {
1067:                        _ExpirationCache = Integer.parseInt(childNodeValue);
1068:                        lastElementType = 8;
1069:                    } else if (childNodeName == "supports") {
1070:                        SupportsType aSupports = newSupportsType();
1071:                        aSupports.readNode(childNode, namespacePrefixes);
1072:                        _Supports.add(aSupports);
1073:                        lastElementType = 9;
1074:                    } else if (childNodeName == "supported-locale") {
1075:                        java.lang.String aSupportedLocale;
1076:                        aSupportedLocale = childNodeValue;
1077:                        _SupportedLocale.add(aSupportedLocale);
1078:                        lastElementType = 10;
1079:                    } else if (childNodeName == "resource-bundle") {
1080:                        _ResourceBundle = childNodeValue;
1081:                        lastElementType = 11;
1082:                    } else if (lastElementType < 12
1083:                            && childNodeName == "portlet-info") {
1084:                        _PortletInfo = newPortletInfoType();
1085:                        _PortletInfo.readNode(childNode, namespacePrefixes);
1086:                        lastElementType = 12;
1087:                    } else if (childNodeName == "portlet-info") {
1088:                        _PortletInfo2 = newPortletInfoType();
1089:                        _PortletInfo2.readNode(childNode, namespacePrefixes);
1090:                        lastElementType = 13;
1091:                    } else if (childNodeName == "portlet-preferences") {
1092:                        _PortletPreferences = newPortletPreferencesType();
1093:                        _PortletPreferences.readNode(childNode,
1094:                                namespacePrefixes);
1095:                        lastElementType = 14;
1096:                    } else if (childNodeName == "security-role-ref") {
1097:                        SecurityRoleRefType aSecurityRoleRef = newSecurityRoleRefType();
1098:                        aSecurityRoleRef.readNode(childNode, namespacePrefixes);
1099:                        _SecurityRoleRef.add(aSecurityRoleRef);
1100:                        lastElementType = 15;
1101:                    } else {
1102:                        // Found extra unrecognized childNode
1103:                    }
1104:                }
1105:            }
1106:
1107:            public void validate()
1108:                    throws org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException {
1109:                boolean restrictionFailure = false;
1110:                boolean restrictionPassed = false;
1111:                // Validating property id
1112:                // Validating property description
1113:                // Validating property descriptionXmlLang
1114:                // Validating property portletName
1115:                if (getPortletName() == null) {
1116:                    throw new org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException(
1117:                            "getPortletName() == null",
1118:                            org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException.FailureType.NULL_VALUE,
1119:                            "portletName", this ); // NOI18N
1120:                }
1121:                // Validating property displayName
1122:                for (int _index = 0; _index < sizeDisplayName(); ++_index) {
1123:                    java.lang.String element = getDisplayName(_index);
1124:                    if (element != null) {
1125:                        // has whitespace restriction
1126:                        if (restrictionFailure) {
1127:                            throw new org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException(
1128:                                    "element whiteSpace (collapse)",
1129:                                    org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException.FailureType.DATA_RESTRICTION,
1130:                                    "displayName", this ); // NOI18N
1131:                        }
1132:                    }
1133:                }
1134:                // Validating property displayNameXmlLang
1135:                // Validating property portletClass
1136:                if (getPortletClass() == null) {
1137:                    throw new org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException(
1138:                            "getPortletClass() == null",
1139:                            org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException.FailureType.NULL_VALUE,
1140:                            "portletClass", this ); // NOI18N
1141:                }
1142:                // Validating property initParam
1143:                for (int _index = 0; _index < sizeInitParam(); ++_index) {
1144:                    org.netbeans.modules.visualweb.api.portlet.dd.InitParamType element = getInitParam(_index);
1145:                    if (element != null) {
1146:                        element.validate();
1147:                    }
1148:                }
1149:                // Validating property expirationCache
1150:                // Validating property supports
1151:                if (sizeSupports() == 0) {
1152:                    throw new org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException(
1153:                            "sizeSupports() == 0",
1154:                            org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException.FailureType.NULL_VALUE,
1155:                            "supports", this ); // NOI18N
1156:                }
1157:                for (int _index = 0; _index < sizeSupports(); ++_index) {
1158:                    org.netbeans.modules.visualweb.api.portlet.dd.SupportsType element = getSupports(_index);
1159:                    if (element != null) {
1160:                        element.validate();
1161:                    }
1162:                }
1163:                // Validating property supportedLocale
1164:                // Validating property resourceBundle
1165:                if (getResourceBundle() == null) {
1166:                    throw new org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException(
1167:                            "getResourceBundle() == null",
1168:                            org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException.FailureType.NULL_VALUE,
1169:                            "resourceBundle", this ); // NOI18N
1170:                }
1171:                // Validating property portletInfo
1172:                if (getPortletInfo() != null) {
1173:                    getPortletInfo().validate();
1174:                }
1175:                // Validating property portletInfo2
1176:                if (getPortletInfo2() != null) {
1177:                    getPortletInfo2().validate();
1178:                }
1179:                if (getPortletInfo2() != null) {
1180:                    if (getResourceBundle() != null) {
1181:                        throw new org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException(
1182:                                "mutually exclusive properties: PortletInfo2 and ResourceBundle",
1183:                                org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException.FailureType.MUTUALLY_EXCLUSIVE,
1184:                                "ResourceBundle", this ); // NOI18N
1185:                    }
1186:                    if (getPortletInfo() != null) {
1187:                        throw new org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException(
1188:                                "mutually exclusive properties: PortletInfo2 and PortletInfo",
1189:                                org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException.FailureType.MUTUALLY_EXCLUSIVE,
1190:                                "PortletInfo", this ); // NOI18N
1191:                    }
1192:                }
1193:                // Validating property portletPreferences
1194:                if (getPortletPreferences() != null) {
1195:                    getPortletPreferences().validate();
1196:                }
1197:                // Validating property securityRoleRef
1198:                for (int _index = 0; _index < sizeSecurityRoleRef(); ++_index) {
1199:                    org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType element = getSecurityRoleRef(_index);
1200:                    if (element != null) {
1201:                        element.validate();
1202:                    }
1203:                }
1204:                if (getPortletInfo() == null && getPortletInfo2() == null
1205:                        && getResourceBundle() == null) {
1206:                    throw new org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException(
1207:                            "required properties: getPortletInfo() == null && getPortletInfo2() == null && getResourceBundle() == null",
1208:                            org.netbeans.modules.visualweb.api.portlet.dd.PortletApp.ValidateException.FailureType.NULL_VALUE,
1209:                            "PortletInfo2", this ); // NOI18N
1210:                }
1211:            }
1212:
1213:            public void changePropertyByName(String name, Object value) {
1214:                if (name == null)
1215:                    return;
1216:                name = name.intern();
1217:                if (name == "id")
1218:                    setId((java.lang.String) value);
1219:                else if (name == "description")
1220:                    addDescription((java.lang.String) value);
1221:                else if (name == "description[]")
1222:                    setDescription((java.lang.String[]) value);
1223:                else if (name == "descriptionXmlLang")
1224:                    addDescriptionXmlLang((java.lang.String) value);
1225:                else if (name == "descriptionXmlLang[]")
1226:                    setDescriptionXmlLang((java.lang.String[]) value);
1227:                else if (name == "portletName")
1228:                    setPortletName((java.lang.String) value);
1229:                else if (name == "displayName")
1230:                    addDisplayName((java.lang.String) value);
1231:                else if (name == "displayName[]")
1232:                    setDisplayName((java.lang.String[]) value);
1233:                else if (name == "displayNameXmlLang")
1234:                    addDisplayNameXmlLang((java.lang.String) value);
1235:                else if (name == "displayNameXmlLang[]")
1236:                    setDisplayNameXmlLang((java.lang.String[]) value);
1237:                else if (name == "portletClass")
1238:                    setPortletClass((java.lang.String) value);
1239:                else if (name == "initParam")
1240:                    addInitParam((InitParamType) value);
1241:                else if (name == "initParam[]")
1242:                    setInitParam((InitParamType[]) value);
1243:                else if (name == "expirationCache")
1244:                    setExpirationCache(((java.lang.Integer) value).intValue());
1245:                else if (name == "supports")
1246:                    addSupports((SupportsType) value);
1247:                else if (name == "supports[]")
1248:                    setSupports((SupportsType[]) value);
1249:                else if (name == "supportedLocale")
1250:                    addSupportedLocale((java.lang.String) value);
1251:                else if (name == "supportedLocale[]")
1252:                    setSupportedLocale((java.lang.String[]) value);
1253:                else if (name == "resourceBundle")
1254:                    setResourceBundle((java.lang.String) value);
1255:                else if (name == "portletInfo")
1256:                    setPortletInfo((PortletInfoType) value);
1257:                else if (name == "portletInfo2")
1258:                    setPortletInfo2((PortletInfoType) value);
1259:                else if (name == "portletPreferences")
1260:                    setPortletPreferences((PortletPreferencesType) value);
1261:                else if (name == "securityRoleRef")
1262:                    addSecurityRoleRef((SecurityRoleRefType) value);
1263:                else if (name == "securityRoleRef[]")
1264:                    setSecurityRoleRef((SecurityRoleRefType[]) value);
1265:                else
1266:                    throw new IllegalArgumentException(name
1267:                            + " is not a valid property name for PortletType");
1268:            }
1269:
1270:            public Object fetchPropertyByName(String name) {
1271:                if (name == "id")
1272:                    return getId();
1273:                if (name == "description[]")
1274:                    return getDescription();
1275:                if (name == "descriptionXmlLang[]")
1276:                    return getDescriptionXmlLang();
1277:                if (name == "portletName")
1278:                    return getPortletName();
1279:                if (name == "displayName[]")
1280:                    return getDisplayName();
1281:                if (name == "displayNameXmlLang[]")
1282:                    return getDisplayNameXmlLang();
1283:                if (name == "portletClass")
1284:                    return getPortletClass();
1285:                if (name == "initParam[]")
1286:                    return getInitParam();
1287:                if (name == "expirationCache")
1288:                    return new java.lang.Integer(getExpirationCache());
1289:                if (name == "supports[]")
1290:                    return getSupports();
1291:                if (name == "supportedLocale[]")
1292:                    return getSupportedLocale();
1293:                if (name == "resourceBundle")
1294:                    return getResourceBundle();
1295:                if (name == "portletInfo")
1296:                    return getPortletInfo();
1297:                if (name == "portletInfo2")
1298:                    return getPortletInfo2();
1299:                if (name == "portletPreferences")
1300:                    return getPortletPreferences();
1301:                if (name == "securityRoleRef[]")
1302:                    return getSecurityRoleRef();
1303:                throw new IllegalArgumentException(name
1304:                        + " is not a valid property name for PortletType");
1305:            }
1306:
1307:            public String nameSelf() {
1308:                return "PortletType";
1309:            }
1310:
1311:            public String nameChild(Object childObj) {
1312:                return nameChild(childObj, false, false);
1313:            }
1314:
1315:            /**
1316:             * @param childObj  The child object to search for
1317:             * @param returnSchemaName  Whether or not the schema name should be returned or the property name
1318:             * @return null if not found
1319:             */
1320:            public String nameChild(Object childObj, boolean returnConstName,
1321:                    boolean returnSchemaName) {
1322:                return nameChild(childObj, returnConstName, returnSchemaName,
1323:                        false);
1324:            }
1325:
1326:            /**
1327:             * @param childObj  The child object to search for
1328:             * @param returnSchemaName  Whether or not the schema name should be returned or the property name
1329:             * @return null if not found
1330:             */
1331:            public String nameChild(Object childObj, boolean returnConstName,
1332:                    boolean returnSchemaName, boolean returnXPathName) {
1333:                if (childObj instanceof  InitParamType) {
1334:                    InitParamType child = (InitParamType) childObj;
1335:                    int index = 0;
1336:                    for (java.util.Iterator it = _InitParam.iterator(); it
1337:                            .hasNext();) {
1338:                        org.netbeans.modules.visualweb.api.portlet.dd.InitParamType element = (org.netbeans.modules.visualweb.api.portlet.dd.InitParamType) it
1339:                                .next();
1340:                        if (child == element) {
1341:                            if (returnConstName) {
1342:                                return INIT_PARAM;
1343:                            } else if (returnSchemaName) {
1344:                                return "init-param";
1345:                            } else if (returnXPathName) {
1346:                                return "init-param[position()=" + index + "]";
1347:                            } else {
1348:                                return "InitParam."
1349:                                        + Integer.toHexString(index);
1350:                            }
1351:                        }
1352:                        ++index;
1353:                    }
1354:                }
1355:                if (childObj instanceof  java.lang.String) {
1356:                    java.lang.String child = (java.lang.String) childObj;
1357:                    if (child == _Id) {
1358:                        if (returnConstName) {
1359:                            return ID;
1360:                        } else if (returnSchemaName) {
1361:                            return "id";
1362:                        } else if (returnXPathName) {
1363:                            return "@id";
1364:                        } else {
1365:                            return "Id";
1366:                        }
1367:                    }
1368:                    int index = 0;
1369:                    for (java.util.Iterator it = _Description.iterator(); it
1370:                            .hasNext();) {
1371:                        java.lang.String element = (java.lang.String) it.next();
1372:                        if (child == element) {
1373:                            if (returnConstName) {
1374:                                return DESCRIPTION;
1375:                            } else if (returnSchemaName) {
1376:                                return "description";
1377:                            } else if (returnXPathName) {
1378:                                return "description[position()=" + index + "]";
1379:                            } else {
1380:                                return "Description."
1381:                                        + Integer.toHexString(index);
1382:                            }
1383:                        }
1384:                        ++index;
1385:                    }
1386:                    index = 0;
1387:                    for (java.util.Iterator it = _DescriptionXmlLang.iterator(); it
1388:                            .hasNext();) {
1389:                        java.lang.String element = (java.lang.String) it.next();
1390:                        if (child == element) {
1391:                            if (returnConstName) {
1392:                                return DESCRIPTIONXMLLANG;
1393:                            } else if (returnSchemaName) {
1394:                                return "xml:lang";
1395:                            } else if (returnXPathName) {
1396:                                return "@xml:lang[position()=" + index + "]";
1397:                            } else {
1398:                                return "DescriptionXmlLang."
1399:                                        + Integer.toHexString(index);
1400:                            }
1401:                        }
1402:                        ++index;
1403:                    }
1404:                    if (child == _PortletName) {
1405:                        if (returnConstName) {
1406:                            return PORTLET_NAME;
1407:                        } else if (returnSchemaName) {
1408:                            return "portlet-name";
1409:                        } else if (returnXPathName) {
1410:                            return "portlet-name";
1411:                        } else {
1412:                            return "PortletName";
1413:                        }
1414:                    }
1415:                    index = 0;
1416:                    for (java.util.Iterator it = _DisplayName.iterator(); it
1417:                            .hasNext();) {
1418:                        java.lang.String element = (java.lang.String) it.next();
1419:                        if (child == element) {
1420:                            if (returnConstName) {
1421:                                return DISPLAY_NAME;
1422:                            } else if (returnSchemaName) {
1423:                                return "display-name";
1424:                            } else if (returnXPathName) {
1425:                                return "display-name[position()=" + index + "]";
1426:                            } else {
1427:                                return "DisplayName."
1428:                                        + Integer.toHexString(index);
1429:                            }
1430:                        }
1431:                        ++index;
1432:                    }
1433:                    index = 0;
1434:                    for (java.util.Iterator it = _DisplayNameXmlLang.iterator(); it
1435:                            .hasNext();) {
1436:                        java.lang.String element = (java.lang.String) it.next();
1437:                        if (child == element) {
1438:                            if (returnConstName) {
1439:                                return DISPLAYNAMEXMLLANG;
1440:                            } else if (returnSchemaName) {
1441:                                return "xml:lang";
1442:                            } else if (returnXPathName) {
1443:                                return "@xml:lang[position()=" + index + "]";
1444:                            } else {
1445:                                return "DisplayNameXmlLang."
1446:                                        + Integer.toHexString(index);
1447:                            }
1448:                        }
1449:                        ++index;
1450:                    }
1451:                    if (child == _PortletClass) {
1452:                        if (returnConstName) {
1453:                            return PORTLET_CLASS;
1454:                        } else if (returnSchemaName) {
1455:                            return "portlet-class";
1456:                        } else if (returnXPathName) {
1457:                            return "portlet-class";
1458:                        } else {
1459:                            return "PortletClass";
1460:                        }
1461:                    }
1462:                    index = 0;
1463:                    for (java.util.Iterator it = _SupportedLocale.iterator(); it
1464:                            .hasNext();) {
1465:                        java.lang.String element = (java.lang.String) it.next();
1466:                        if (child == element) {
1467:                            if (returnConstName) {
1468:                                return SUPPORTED_LOCALE;
1469:                            } else if (returnSchemaName) {
1470:                                return "supported-locale";
1471:                            } else if (returnXPathName) {
1472:                                return "supported-locale[position()=" + index
1473:                                        + "]";
1474:                            } else {
1475:                                return "SupportedLocale."
1476:                                        + Integer.toHexString(index);
1477:                            }
1478:                        }
1479:                        ++index;
1480:                    }
1481:                    if (child == _ResourceBundle) {
1482:                        if (returnConstName) {
1483:                            return RESOURCE_BUNDLE;
1484:                        } else if (returnSchemaName) {
1485:                            return "resource-bundle";
1486:                        } else if (returnXPathName) {
1487:                            return "resource-bundle";
1488:                        } else {
1489:                            return "ResourceBundle";
1490:                        }
1491:                    }
1492:                }
1493:                if (childObj instanceof  java.lang.Integer) {
1494:                    java.lang.Integer child = (java.lang.Integer) childObj;
1495:                    if (((java.lang.Integer) child).intValue() == _ExpirationCache) {
1496:                        if (returnConstName) {
1497:                            return EXPIRATION_CACHE;
1498:                        } else if (returnSchemaName) {
1499:                            return "expiration-cache";
1500:                        } else if (returnXPathName) {
1501:                            return "expiration-cache";
1502:                        } else {
1503:                            return "ExpirationCache";
1504:                        }
1505:                    }
1506:                }
1507:                if (childObj instanceof  SecurityRoleRefType) {
1508:                    SecurityRoleRefType child = (SecurityRoleRefType) childObj;
1509:                    int index = 0;
1510:                    for (java.util.Iterator it = _SecurityRoleRef.iterator(); it
1511:                            .hasNext();) {
1512:                        org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType element = (org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType) it
1513:                                .next();
1514:                        if (child == element) {
1515:                            if (returnConstName) {
1516:                                return SECURITY_ROLE_REF;
1517:                            } else if (returnSchemaName) {
1518:                                return "security-role-ref";
1519:                            } else if (returnXPathName) {
1520:                                return "security-role-ref[position()=" + index
1521:                                        + "]";
1522:                            } else {
1523:                                return "SecurityRoleRef."
1524:                                        + Integer.toHexString(index);
1525:                            }
1526:                        }
1527:                        ++index;
1528:                    }
1529:                }
1530:                if (childObj instanceof  PortletPreferencesType) {
1531:                    PortletPreferencesType child = (PortletPreferencesType) childObj;
1532:                    if (child == _PortletPreferences) {
1533:                        if (returnConstName) {
1534:                            return PORTLET_PREFERENCES;
1535:                        } else if (returnSchemaName) {
1536:                            return "portlet-preferences";
1537:                        } else if (returnXPathName) {
1538:                            return "portlet-preferences";
1539:                        } else {
1540:                            return "PortletPreferences";
1541:                        }
1542:                    }
1543:                }
1544:                if (childObj instanceof  PortletInfoType) {
1545:                    PortletInfoType child = (PortletInfoType) childObj;
1546:                    if (child == _PortletInfo) {
1547:                        if (returnConstName) {
1548:                            return PORTLET_INFO;
1549:                        } else if (returnSchemaName) {
1550:                            return "portlet-info";
1551:                        } else if (returnXPathName) {
1552:                            return "portlet-info";
1553:                        } else {
1554:                            return "PortletInfo";
1555:                        }
1556:                    }
1557:                    if (child == _PortletInfo2) {
1558:                        if (returnConstName) {
1559:                            return PORTLET_INFO2;
1560:                        } else if (returnSchemaName) {
1561:                            return "portlet-info";
1562:                        } else if (returnXPathName) {
1563:                            return "portlet-info";
1564:                        } else {
1565:                            return "PortletInfo2";
1566:                        }
1567:                    }
1568:                }
1569:                if (childObj instanceof  SupportsType) {
1570:                    SupportsType child = (SupportsType) childObj;
1571:                    int index = 0;
1572:                    for (java.util.Iterator it = _Supports.iterator(); it
1573:                            .hasNext();) {
1574:                        org.netbeans.modules.visualweb.api.portlet.dd.SupportsType element = (org.netbeans.modules.visualweb.api.portlet.dd.SupportsType) it
1575:                                .next();
1576:                        if (child == element) {
1577:                            if (returnConstName) {
1578:                                return SUPPORTS;
1579:                            } else if (returnSchemaName) {
1580:                                return "supports";
1581:                            } else if (returnXPathName) {
1582:                                return "supports[position()=" + index + "]";
1583:                            } else {
1584:                                return "Supports." + Integer.toHexString(index);
1585:                            }
1586:                        }
1587:                        ++index;
1588:                    }
1589:                }
1590:                return null;
1591:            }
1592:
1593:            /**
1594:             * Return an array of all of the properties that are beans and are set.
1595:             */
1596:            public org.netbeans.modules.visualweb.api.portlet.dd.CommonBean[] childBeans(
1597:                    boolean recursive) {
1598:                java.util.List children = new java.util.LinkedList();
1599:                childBeans(recursive, children);
1600:                org.netbeans.modules.visualweb.api.portlet.dd.CommonBean[] result = new org.netbeans.modules.visualweb.api.portlet.dd.CommonBean[children
1601:                        .size()];
1602:                return (org.netbeans.modules.visualweb.api.portlet.dd.CommonBean[]) children
1603:                        .toArray(result);
1604:            }
1605:
1606:            /**
1607:             * Put all child beans into the beans list.
1608:             */
1609:            public void childBeans(boolean recursive, java.util.List beans) {
1610:                for (java.util.Iterator it = _InitParam.iterator(); it
1611:                        .hasNext();) {
1612:                    org.netbeans.modules.visualweb.api.portlet.dd.InitParamType element = (org.netbeans.modules.visualweb.api.portlet.dd.InitParamType) it
1613:                            .next();
1614:                    if (element != null) {
1615:                        if (recursive) {
1616:                            element.childBeans(true, beans);
1617:                        }
1618:                        beans.add(element);
1619:                    }
1620:                }
1621:                for (java.util.Iterator it = _Supports.iterator(); it.hasNext();) {
1622:                    org.netbeans.modules.visualweb.api.portlet.dd.SupportsType element = (org.netbeans.modules.visualweb.api.portlet.dd.SupportsType) it
1623:                            .next();
1624:                    if (element != null) {
1625:                        if (recursive) {
1626:                            element.childBeans(true, beans);
1627:                        }
1628:                        beans.add(element);
1629:                    }
1630:                }
1631:                if (_PortletInfo != null) {
1632:                    if (recursive) {
1633:                        _PortletInfo.childBeans(true, beans);
1634:                    }
1635:                    beans.add(_PortletInfo);
1636:                }
1637:                if (_PortletInfo2 != null) {
1638:                    if (recursive) {
1639:                        _PortletInfo2.childBeans(true, beans);
1640:                    }
1641:                    beans.add(_PortletInfo2);
1642:                }
1643:                if (_PortletPreferences != null) {
1644:                    if (recursive) {
1645:                        _PortletPreferences.childBeans(true, beans);
1646:                    }
1647:                    beans.add(_PortletPreferences);
1648:                }
1649:                for (java.util.Iterator it = _SecurityRoleRef.iterator(); it
1650:                        .hasNext();) {
1651:                    org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType element = (org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType) it
1652:                            .next();
1653:                    if (element != null) {
1654:                        if (recursive) {
1655:                            element.childBeans(true, beans);
1656:                        }
1657:                        beans.add(element);
1658:                    }
1659:                }
1660:            }
1661:
1662:            public boolean equals(Object o) {
1663:                return o instanceof  org.netbeans.modules.visualweb.api.portlet.dd.PortletType
1664:                        && equals((org.netbeans.modules.visualweb.api.portlet.dd.PortletType) o);
1665:            }
1666:
1667:            public boolean equals(
1668:                    org.netbeans.modules.visualweb.api.portlet.dd.PortletType inst) {
1669:                if (inst == this ) {
1670:                    return true;
1671:                }
1672:                if (inst == null) {
1673:                    return false;
1674:                }
1675:                if (!(_Id == null ? inst._Id == null : _Id.equals(inst._Id))) {
1676:                    return false;
1677:                }
1678:                if (sizeDescription() != inst.sizeDescription())
1679:                    return false;
1680:                // Compare every element.
1681:                for (java.util.Iterator it = _Description.iterator(), it2 = inst._Description
1682:                        .iterator(); it.hasNext() && it2.hasNext();) {
1683:                    java.lang.String element = (java.lang.String) it.next();
1684:                    java.lang.String element2 = (java.lang.String) it2.next();
1685:                    if (!(element == null ? element2 == null : element
1686:                            .equals(element2))) {
1687:                        return false;
1688:                    }
1689:                }
1690:                if (sizeDescriptionXmlLang() != inst.sizeDescriptionXmlLang())
1691:                    return false;
1692:                // Compare every element.
1693:                for (java.util.Iterator it = _DescriptionXmlLang.iterator(), it2 = inst._DescriptionXmlLang
1694:                        .iterator(); it.hasNext() && it2.hasNext();) {
1695:                    java.lang.String element = (java.lang.String) it.next();
1696:                    java.lang.String element2 = (java.lang.String) it2.next();
1697:                    if (!(element == null ? element2 == null : element
1698:                            .equals(element2))) {
1699:                        return false;
1700:                    }
1701:                }
1702:                if (!(_PortletName == null ? inst._PortletName == null
1703:                        : _PortletName.equals(inst._PortletName))) {
1704:                    return false;
1705:                }
1706:                if (sizeDisplayName() != inst.sizeDisplayName())
1707:                    return false;
1708:                // Compare every element.
1709:                for (java.util.Iterator it = _DisplayName.iterator(), it2 = inst._DisplayName
1710:                        .iterator(); it.hasNext() && it2.hasNext();) {
1711:                    java.lang.String element = (java.lang.String) it.next();
1712:                    java.lang.String element2 = (java.lang.String) it2.next();
1713:                    if (!(element == null ? element2 == null : element
1714:                            .equals(element2))) {
1715:                        return false;
1716:                    }
1717:                }
1718:                if (sizeDisplayNameXmlLang() != inst.sizeDisplayNameXmlLang())
1719:                    return false;
1720:                // Compare every element.
1721:                for (java.util.Iterator it = _DisplayNameXmlLang.iterator(), it2 = inst._DisplayNameXmlLang
1722:                        .iterator(); it.hasNext() && it2.hasNext();) {
1723:                    java.lang.String element = (java.lang.String) it.next();
1724:                    java.lang.String element2 = (java.lang.String) it2.next();
1725:                    if (!(element == null ? element2 == null : element
1726:                            .equals(element2))) {
1727:                        return false;
1728:                    }
1729:                }
1730:                if (!(_PortletClass == null ? inst._PortletClass == null
1731:                        : _PortletClass.equals(inst._PortletClass))) {
1732:                    return false;
1733:                }
1734:                if (sizeInitParam() != inst.sizeInitParam())
1735:                    return false;
1736:                // Compare every element.
1737:                for (java.util.Iterator it = _InitParam.iterator(), it2 = inst._InitParam
1738:                        .iterator(); it.hasNext() && it2.hasNext();) {
1739:                    org.netbeans.modules.visualweb.api.portlet.dd.InitParamType element = (org.netbeans.modules.visualweb.api.portlet.dd.InitParamType) it
1740:                            .next();
1741:                    org.netbeans.modules.visualweb.api.portlet.dd.InitParamType element2 = (org.netbeans.modules.visualweb.api.portlet.dd.InitParamType) it2
1742:                            .next();
1743:                    if (!(element == null ? element2 == null : element
1744:                            .equals(element2))) {
1745:                        return false;
1746:                    }
1747:                }
1748:                if (!(_ExpirationCache == inst._ExpirationCache)) {
1749:                    return false;
1750:                }
1751:                if (sizeSupports() != inst.sizeSupports())
1752:                    return false;
1753:                // Compare every element.
1754:                for (java.util.Iterator it = _Supports.iterator(), it2 = inst._Supports
1755:                        .iterator(); it.hasNext() && it2.hasNext();) {
1756:                    org.netbeans.modules.visualweb.api.portlet.dd.SupportsType element = (org.netbeans.modules.visualweb.api.portlet.dd.SupportsType) it
1757:                            .next();
1758:                    org.netbeans.modules.visualweb.api.portlet.dd.SupportsType element2 = (org.netbeans.modules.visualweb.api.portlet.dd.SupportsType) it2
1759:                            .next();
1760:                    if (!(element == null ? element2 == null : element
1761:                            .equals(element2))) {
1762:                        return false;
1763:                    }
1764:                }
1765:                if (sizeSupportedLocale() != inst.sizeSupportedLocale())
1766:                    return false;
1767:                // Compare every element.
1768:                for (java.util.Iterator it = _SupportedLocale.iterator(), it2 = inst._SupportedLocale
1769:                        .iterator(); it.hasNext() && it2.hasNext();) {
1770:                    java.lang.String element = (java.lang.String) it.next();
1771:                    java.lang.String element2 = (java.lang.String) it2.next();
1772:                    if (!(element == null ? element2 == null : element
1773:                            .equals(element2))) {
1774:                        return false;
1775:                    }
1776:                }
1777:                if (!(_ResourceBundle == null ? inst._ResourceBundle == null
1778:                        : _ResourceBundle.equals(inst._ResourceBundle))) {
1779:                    return false;
1780:                }
1781:                if (!(_PortletInfo == null ? inst._PortletInfo == null
1782:                        : _PortletInfo.equals(inst._PortletInfo))) {
1783:                    return false;
1784:                }
1785:                if (!(_PortletInfo2 == null ? inst._PortletInfo2 == null
1786:                        : _PortletInfo2.equals(inst._PortletInfo2))) {
1787:                    return false;
1788:                }
1789:                if (!(_PortletPreferences == null ? inst._PortletPreferences == null
1790:                        : _PortletPreferences.equals(inst._PortletPreferences))) {
1791:                    return false;
1792:                }
1793:                if (sizeSecurityRoleRef() != inst.sizeSecurityRoleRef())
1794:                    return false;
1795:                // Compare every element.
1796:                for (java.util.Iterator it = _SecurityRoleRef.iterator(), it2 = inst._SecurityRoleRef
1797:                        .iterator(); it.hasNext() && it2.hasNext();) {
1798:                    org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType element = (org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType) it
1799:                            .next();
1800:                    org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType element2 = (org.netbeans.modules.visualweb.api.portlet.dd.SecurityRoleRefType) it2
1801:                            .next();
1802:                    if (!(element == null ? element2 == null : element
1803:                            .equals(element2))) {
1804:                        return false;
1805:                    }
1806:                }
1807:                return true;
1808:            }
1809:
1810:            public int hashCode() {
1811:                int result = 17;
1812:                result = 37 * result + (_Id == null ? 0 : _Id.hashCode());
1813:                result = 37 * result
1814:                        + (_Description == null ? 0 : _Description.hashCode());
1815:                result = 37
1816:                        * result
1817:                        + (_DescriptionXmlLang == null ? 0
1818:                                : _DescriptionXmlLang.hashCode());
1819:                result = 37 * result
1820:                        + (_PortletName == null ? 0 : _PortletName.hashCode());
1821:                result = 37 * result
1822:                        + (_DisplayName == null ? 0 : _DisplayName.hashCode());
1823:                result = 37
1824:                        * result
1825:                        + (_DisplayNameXmlLang == null ? 0
1826:                                : _DisplayNameXmlLang.hashCode());
1827:                result = 37
1828:                        * result
1829:                        + (_PortletClass == null ? 0 : _PortletClass.hashCode());
1830:                result = 37 * result
1831:                        + (_InitParam == null ? 0 : _InitParam.hashCode());
1832:                result = 37 * result + (_ExpirationCache);
1833:                result = 37 * result
1834:                        + (_Supports == null ? 0 : _Supports.hashCode());
1835:                result = 37
1836:                        * result
1837:                        + (_SupportedLocale == null ? 0 : _SupportedLocale
1838:                                .hashCode());
1839:                result = 37
1840:                        * result
1841:                        + (_ResourceBundle == null ? 0 : _ResourceBundle
1842:                                .hashCode());
1843:                result = 37 * result
1844:                        + (_PortletInfo == null ? 0 : _PortletInfo.hashCode());
1845:                result = 37
1846:                        * result
1847:                        + (_PortletInfo2 == null ? 0 : _PortletInfo2.hashCode());
1848:                result = 37
1849:                        * result
1850:                        + (_PortletPreferences == null ? 0
1851:                                : _PortletPreferences.hashCode());
1852:                result = 37
1853:                        * result
1854:                        + (_SecurityRoleRef == null ? 0 : _SecurityRoleRef
1855:                                .hashCode());
1856:                return result;
1857:            }
1858:
1859:            public String toString() {
1860:                java.io.StringWriter sw = new java.io.StringWriter();
1861:                try {
1862:                    writeNode(sw);
1863:                } catch (java.io.IOException e) {
1864:                    // How can we actually get an IOException on a StringWriter?
1865:                    throw new RuntimeException(e);
1866:                }
1867:                return sw.toString();
1868:            }
1869:
1870:        }
w___ww.__j__a__v___a___2___s__.___c__om | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.