Source Code Cross Referenced for JournalCreationStrategy.java in  » Portal » liferay-portal-4.4.2 » com » liferay » portlet » journal » lar » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » liferay portal 4.4.2 » com.liferay.portlet.journal.lar 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
003:         *
004:         * Permission is hereby granted, free of charge, to any person obtaining a copy
005:         * of this software and associated documentation files (the "Software"), to deal
006:         * in the Software without restriction, including without limitation the rights
007:         * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008:         * copies of the Software, and to permit persons to whom the Software is
009:         * furnished to do so, subject to the following conditions:
010:         *
011:         * The above copyright notice and this permission notice shall be included in
012:         * all copies or substantial portions of the Software.
013:         *
014:         * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015:         * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016:         * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017:         * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018:         * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019:         * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020:         * SOFTWARE.
021:         */package com.liferay.portlet.journal.lar;
022:
023:        import com.liferay.portlet.journal.model.JournalArticle;
024:
025:        /**
026:         * <a href="JournalCreationStrategy.java.html"><b><i>View Source</i></b></a>
027:         *
028:         * <p>
029:         * An interface defining how newly created content should be added to the
030:         * Journal when imported from a LAR file. A class implementing this interface
031:         * should be specified in <i>portal.properties</i> under the
032:         * <b>journal.lar.creation.strategy</b> property.
033:         * </p>
034:         *
035:         * @author Joel Kozikowski
036:         *
037:         */
038:        public interface JournalCreationStrategy {
039:
040:            /**
041:             * Constant returned by getAuthorUserId() and/or getApprovalUserId()
042:             * that indicates the default portlet data import user id strategy that
043:             * should be used to determine the user id.
044:             */
045:            public static final long USE_DEFAULT_USER_ID_STRATEGY = 0;
046:
047:            /**
048:             * Constant returned by getTransformedContent() to indicate that the
049:             * article text should remained unchanged.
050:             */
051:            public static final String ARTICLE_CONTENT_UNCHANGED = null;
052:
053:            /**
054:             * Returns the author's user id to assign to newly created content. If zero
055:             * is returned, the default user id import strategy will determine the
056:             * author id.
057:             *
058:             * @param		companyId the company id of the layout
059:             * @param		groupId the group id of the layout
060:             * @param		journalObj the new object must be an instance of
061:             *				JournalArticle, JournalStructure, or JournalTemplate
062:             * @return		the author's user id or USE_DEFAULT_USER_ID_STRATEGY to use
063:             *				the default user id strategy
064:             */
065:            public long getAuthorUserId(long companyId, long groupId,
066:                    Object journalObj) throws Exception;
067:
068:            /**
069:             * Returns the approver's user id to assign to newly created content. If
070:             * zero is returned, the default user id import strategy will determine the
071:             * author id.
072:             *
073:             * @param		companyId the company id of the layout
074:             * @param		groupId the group id of the layout
075:             * @param		journalObj the new object must be an instance of
076:             *				JournalArticle, JournalStructure, or JournalTemplate
077:             * @return		the approver's user id or USE_DEFAULT_USER_ID_STRATEGY to
078:             *				use the default user id strategy
079:             */
080:            public long getApprovalUserId(long companyId, long groupId,
081:                    Object journalObj) throws Exception;
082:
083:            /**
084:             * Gives the content creation strategy an opportunity to transform the
085:             * content before the new article is saved to the database. Possible use
086:             * cases include using Velocity to merge in community specific values into
087:             * the text. Returns the new content to assign to the article. If null is
088:             * returned, the article content will be added unchanged.
089:             *
090:             * @param		companyId the company id of the layout
091:             * @param		groupId the group id of the layout
092:             * @param		newArticle the new article being created
093:             * @return		the transformed content to save in the database or
094:             *				ARTICLE_CONTENT_UNCHANGED if the content should be added
095:             *				unchanged
096:             */
097:            public String getTransformedContent(long companyId, long groupId,
098:                    JournalArticle newArticle) throws Exception;
099:
100:            /**
101:             * Returns true if the default community permissions should be added when
102:             * the specified journalObj is created.
103:             *
104:             * @param		companyId the company id of the layout
105:             * @param		groupId the group id of the layout
106:             * @param		journalObj the new object must be an instance of
107:             *				JournalArticle, JournalStructure, or JournalTemplate
108:             * @return		true if default community permissions should be added to the
109:             *				specified journalObj
110:             */
111:            public boolean addCommunityPermissions(long companyId,
112:                    long groupId, Object journalObj) throws Exception;
113:
114:            /**
115:             * Returns true if the default guest permissions should be added when the
116:             * specified journalObj is created.
117:             *
118:             * @param		companyId the company id of the layout
119:             * @param		groupId the group id of the layout
120:             * @param		journalObj the new object must be an instance of
121:             *				JournalArticle, JournalStructure, or JournalTemplate
122:             * @return		true if default guest permissions should be added to the
123:             *				specified journalObj
124:             */
125:            public boolean addGuestPermissions(long companyId, long groupId,
126:                    Object journalObj) throws Exception;
127:
128:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.