Source Code Cross Referenced for TemplateFileRef.java in  » ERP-CRM-Financial » sakai » org » theospi » portfolio » presentation » model » 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 » ERP CRM Financial » sakai » org.theospi.portfolio.presentation.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************************
002:         * $URL:https://source.sakaiproject.org/svn/osp/trunk/presentation/api/src/java/org/theospi/portfolio/presentation/model/TemplateFileRef.java $
003:         * $Id:TemplateFileRef.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $
004:         ***********************************************************************************
005:         *
006:         * Copyright (c) 2005, 2006 The Sakai Foundation.
007:         *
008:         * Licensed under the Educational Community License, Version 1.0 (the "License");
009:         * you may not use this file except in compliance with the License.
010:         * You may obtain a copy of the License at
011:         *
012:         *      http://www.opensource.org/licenses/ecl1.php
013:         *
014:         * Unless required by applicable law or agreed to in writing, software
015:         * distributed under the License is distributed on an "AS IS" BASIS,
016:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017:         * See the License for the specific language governing permissions and
018:         * limitations under the License.
019:         *
020:         **********************************************************************************/package org.theospi.portfolio.presentation.model;
021:
022:        import java.io.Serializable;
023:
024:        import org.apache.commons.logging.Log;
025:        import org.apache.commons.logging.LogFactory;
026:        import org.sakaiproject.component.cover.ComponentManager;
027:        import org.sakaiproject.metaobj.shared.mgt.IdManager;
028:        import org.sakaiproject.metaobj.shared.model.IdentifiableObject;
029:        import org.theospi.portfolio.presentation.PresentationManager;
030:        import org.theospi.portfolio.shared.mgt.ArtifactUserType;
031:        import org.theospi.portfolio.shared.model.Node;
032:
033:        /** @author Hibernate CodeGenerator */
034:        public class TemplateFileRef extends IdentifiableObject implements 
035:                Serializable {
036:            protected final transient Log logger = LogFactory
037:                    .getLog(getClass());
038:
039:            //private ArtifactUserType file;
040:            private String fileId;
041:            private String fileType;
042:
043:            //private transient Artifact cachedArtifact = null;
044:            private transient String artifactName = null;
045:            private transient String action;
046:
047:            /** nullable persistent field */
048:            private String usage;
049:
050:            private transient PresentationTemplate presentationTemplate;
051:
052:            static final long serialVersionUID = -6220810277272518156l;
053:
054:            /** full constructor */
055:            public TemplateFileRef(ArtifactUserType file, String usage,
056:                    PresentationTemplate presentationTemplate) {
057:                this .usage = usage;
058:                this .presentationTemplate = presentationTemplate;
059:            }
060:
061:            /** default constructor */
062:            public TemplateFileRef() {
063:                // todo 8/10
064:                // setFile(new ArtifactUserType());
065:                //getFile().setHome("fileArtifact");
066:            }
067:
068:            /** minimal constructor */
069:            public TemplateFileRef(PresentationTemplate presentationTemplate) {
070:                this .presentationTemplate = presentationTemplate;
071:            }
072:
073:            public String getAction() {
074:                return action;
075:            }
076:
077:            public void setAction(String action) {
078:                this .action = action;
079:            }
080:
081:            //   public ArtifactUserType getFile() {
082:            //       return this.file;
083:            //   }
084:            //
085:            //   public void setFile(ArtifactUserType file) {
086:            //      this.cachedArtifact = null;
087:            //       this.file = file;
088:            //   }
089:
090:            public String getUsage() {
091:                return this .usage;
092:            }
093:
094:            public void setUsage(String use) {
095:                this .usage = use;
096:            }
097:
098:            public PresentationTemplate getPresentationTemplate() {
099:                return this .presentationTemplate;
100:            }
101:
102:            public void setPresentationTemplate(
103:                    PresentationTemplate presentationTemplate) {
104:                this .presentationTemplate = presentationTemplate;
105:            }
106:
107:            private Node getNode() {
108:                return getPresentationManager().getNode(
109:                        getIdManager().getId(fileId));
110:            }
111:
112:            public String getArtifactName() {
113:                if (artifactName == null) {
114:                    if (getNode() != null) {
115:                        artifactName = getNode().getDisplayName();
116:                    }
117:                }
118:
119:                return artifactName;
120:            }
121:
122:            public void setArtifactName(String artifactName) {
123:                this .artifactName = artifactName;
124:            }
125:
126:            public String toString() {
127:                return "TemplateFileRef{" + "id=" + getId() + ", fileId="
128:                        + fileId + ", usage='" + usage + "'"
129:                        + ", presentationTemplate=" + presentationTemplate
130:                        + "}";
131:            }
132:
133:            public int hashCode() {
134:                if (getId() != null) {
135:                    return getId().hashCode();
136:                }
137:
138:                if (fileId != null) {
139:                    return fileId.hashCode();
140:                } else {
141:                    return 0;
142:                }
143:            }
144:
145:            /*
146:             protected void setupFile() {
147:             if (fileType != null && fileId != null) {
148:             setFile(new ArtifactUserType(fileId, fileType));
149:             }
150:             }
151:             */
152:            public String getFileId() {
153:                //return getFile().getId().getValue();
154:                return this .fileId;
155:            }
156:
157:            public void setFileId(String fileId) {
158:                this .fileId = fileId;
159:                //setupFile();
160:            }
161:
162:            public String getFileType() {
163:                //return getFile().getHome().getType().getId().getValue();
164:                return this .fileType;
165:            }
166:
167:            public void setFileType(String fileType) {
168:                this .fileType = fileType;
169:                //setupFile();
170:            }
171:
172:            public PresentationManager getPresentationManager() {
173:                return (PresentationManager) ComponentManager.getInstance()
174:                        .get("presentationManager");
175:            }
176:
177:            public IdManager getIdManager() {
178:                return (IdManager) ComponentManager.getInstance().get(
179:                        "idManager");
180:            }
181:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.