Source Code Cross Referenced for Folder.java in  » Content-Management-System » contelligent » de » finix » contelligent » components » 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 » Content Management System » contelligent » de.finix.contelligent.components 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2001-2006 C:1 Financial Services GmbH
003:         *
004:         * This software is free software; you can redistribute it and/or
005:         * modify it under the terms of the GNU Lesser General Public
006:         * License Version 2.1, as published by the Free Software Foundation.
007:         *
008:         * This software is distributed in the hope that it will be useful,
009:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
010:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
011:         * Lesser General Public License for more details.
012:         *
013:         * You should have received a copy of the GNU Lesser General Public
014:         * License along with this library; if not, write to the Free Software
015:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
016:         */
017:
018:        package de.finix.contelligent.components;
019:
020:        import java.util.Iterator;
021:
022:        import de.finix.contelligent.AbstractComponent;
023:        import de.finix.contelligent.CallData;
024:        import de.finix.contelligent.Component;
025:        import de.finix.contelligent.ComponentNotFoundException;
026:        import de.finix.contelligent.ComponentPathException;
027:        import de.finix.contelligent.Container;
028:        import de.finix.contelligent.logging.LoggingService;
029:        import de.finix.contelligent.search.Metainfo;
030:
031:        /**
032:         * A base class defining a simple Contelligent {@link Container}.
033:         */
034:        public class Folder extends AbstractComponent implements  Container {
035:            final static org.apache.log4j.Logger log = LoggingService
036:                    .getLogger(Folder.class);
037:
038:            public static final String METAINFO_NAME = "metainfo";
039:
040:            // 'rn' property
041:            public boolean getHasChildren() {
042:                return (ctx.getCallManager().getSubcomponentCount(this ) > 0);
043:            }
044:
045:            /**
046:             * changed to return iterator for large containers
047:             */
048:            public Iterator getSubcomponentNames() {
049:                return ctx.getCallManager().getSubcomponentNames(this )
050:                        .iterator();
051:            }
052:
053:            /*
054:             * public Iterator getSubcomponentNames(int startWith, int amount) { if
055:             * (log.isDebugEnabled()) log.debug("getSubcomponentNames() -
056:             * startWith="+startWith+" amount="+amount); ComponentManager manager =
057:             * ctx.getCallManager(); return manager.getSubcomponentNames(this,
058:             * startWith, amount); }
059:             * 
060:             * 
061:             * public static class SubcomponentIterator implements Iterator { Container
062:             * container; boolean followLinks; Iterator nameI;
063:             * 
064:             * public SubcomponentIterator(Container container, int start, int amount,
065:             * boolean followLinks) { this.container = container; this.followLinks =
066:             * followLinks; nameI = container.getSubcomponentNames(start, amount); if
067:             * (log.isDebugEnabled()) { log.debug("[SubcomponentIterator:<init>] -
068:             * created iterator for container '"+container +"' with
069:             * followLinks="+followLinks+", start="+start+", amount="+amount +" and
070:             * nameIterator "+nameI); } }
071:             * 
072:             * public boolean hasNext() { return nameI.hasNext(); }
073:             * 
074:             * public Object next() { String subName = (String)nameI.next(); try {
075:             * ComponentManager manager = ThreadedMem.getActualManager(); return
076:             * manager.getSubcomponent(container, subName, ThreadedMem.getCallData(),
077:             * followLinks); } catch (ComponentNotFoundException e) {
078:             * log.error("[SubcomponentIterator:next()] - could not get subcomponent '"
079:             * +subName+"' of container '"+container+": ",e); throw new
080:             * java.util.NoSuchElementException("[SubcomponentIterator:next()] - could
081:             * not get subcomponent '" +subName+"' of container '"+container+": "+e); }
082:             * catch (ComponentPathException e) {
083:             * log.error("[SubcomponentIterator:next()] - could not get subcomponent '"
084:             * +subName+"' of container '"+container+": ",e); throw new
085:             * java.util.NoSuchElementException("[SubcomponentIterator:next()] - could
086:             * not get subcomponent '" +subName+"' of container '"+container+": "+e); } }
087:             * 
088:             * public void remove() { //UnsupportedOperationException nameI.remove(); } }
089:             * 
090:             * 
091:             * public Iterator subcomponents() { return subcomponents(0); }
092:             * 
093:             * public Iterator subcomponents(boolean followLinks) { return
094:             * subcomponents(0, followLinks); }
095:             * 
096:             * public Iterator subcomponents(int start) { return new
097:             * SubcomponentIterator(this, start, -1, true); // do follow links }
098:             * 
099:             * public Iterator subcomponents(int start, boolean followLinks) { return
100:             * new SubcomponentIterator(this, start, -1, followLinks); }
101:             */
102:
103:            /**
104:             * This is the implementation of {@link Component#getSearchMetainfo}.
105:             * Overwrite that method for extension.
106:             * 
107:             * @returns
108:             */
109:            public void putSearchMetainfo(Metainfo metainfo, CallData callData) {
110:                super .putSearchMetainfo(metainfo, callData);
111:
112:                try {
113:                    Component metainfoComponent = callData.getActualManager()
114:                            .getSubcomponent(this , METAINFO_NAME, callData,
115:                                    true);
116:                    if (metainfoComponent instanceof  de.finix.contelligent.SearchMetainfo) {
117:                        metainfoComponent.putSearchMetainfo(metainfo, callData);
118:                    }
119:                } catch (ComponentNotFoundException e) {
120:                    // ignore -> no metainfo available
121:                } catch (ComponentPathException e) {
122:                    // ignore -> we define a valid path
123:                }
124:            }
125:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.