Source Code Cross Referenced for FxContentSecurityInfo.java in  » J2EE » fleXive » com » flexive » shared » content » 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 » J2EE » fleXive » com.flexive.shared.content 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /***************************************************************
002:         *  This file is part of the [fleXive](R) project.
003:         *
004:         *  Copyright (c) 1999-2008
005:         *  UCS - unique computing solutions gmbh (http://www.ucs.at)
006:         *  All rights reserved
007:         *
008:         *  The [fleXive](R) project is free software; you can redistribute
009:         *  it and/or modify it under the terms of the GNU General Public
010:         *  License as published by the Free Software Foundation;
011:         *  either version 2 of the License, or (at your option) any
012:         *  later version.
013:         *
014:         *  The GNU General Public License can be found at
015:         *  http://www.gnu.org/copyleft/gpl.html.
016:         *  A copy is found in the textfile GPL.txt and important notices to the
017:         *  license from the author are found in LICENSE.txt distributed with
018:         *  these libraries.
019:         *
020:         *  This library is distributed in the hope that it will be useful,
021:         *  but WITHOUT ANY WARRANTY; without even the implied warranty of
022:         *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
023:         *  GNU General Public License for more details.
024:         *
025:         *  For further information about UCS - unique computing solutions gmbh,
026:         *  please see the company website: http://www.ucs.at
027:         *
028:         *  For further information about [fleXive](R), please see the
029:         *  project website: http://www.flexive.org
030:         *
031:         *
032:         *  This copyright notice MUST APPEAR in all copies of the file!
033:         ***************************************************************/package com.flexive.shared.content;
034:
035:        import org.apache.commons.lang.ArrayUtils;
036:
037:        import java.io.Serializable;
038:        import java.util.Arrays;
039:        import java.util.Collections;
040:        import java.util.List;
041:
042:        /**
043:         * Security related information about a content (primary key)
044:         *
045:         * @author Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
046:         */
047:        public class FxContentSecurityInfo implements  Serializable {
048:
049:            private static final long serialVersionUID = -5140606563012031397L;
050:
051:            /**
052:             * Primary key this info relates to
053:             */
054:            private FxPK pk;
055:
056:            /**
057:             * user id of the owner of the content
058:             */
059:            private long ownerId;
060:
061:            /**
062:             * Id of preview image, only relevant for security if > 0
063:             */
064:            private long previewId;
065:
066:            /**
067:             * Id of the FxType used
068:             */
069:            private long typeId;
070:
071:            /**
072:             * Id of the mandator this content belongs to
073:             */
074:            private long mandatorId;
075:
076:            /**
077:             * binary encoded type permissions
078:             */
079:            private byte permissions;
080:
081:            /**
082:             * ACL assigned to the type
083:             */
084:            private int typeACL;
085:
086:            /**
087:             * ACL of the used step
088:             */
089:            private int stepACL;
090:
091:            /**
092:             * ACL of the content itself
093:             */
094:            private int contentACL;
095:
096:            /**
097:             * Property ACL of the preview, only relevant for security if <code>previewId</code> &gt; 0
098:             */
099:            private int previewACL;
100:
101:            /**
102:             * All used and relevant property ACL's. will be empty if property permissions are disabled for
103:             * the type
104:             */
105:            private List<Long> usedPropertyACL;
106:
107:            /**
108:             * Constructor
109:             *
110:             * @param pk              the primary key this info relates to
111:             * @param ownerId         owner of the content
112:             * @param previewId       Id of preview image, only relevant for security if &gt; 0
113:             * @param typeId          id of the used type
114:             * @param mandatorId      id of the mandator
115:             * @param typePermissions byte encoded type permission handling
116:             * @param typeACL         ACL of the type
117:             * @param stepACL         ACL of the step
118:             * @param contentACL      ACL of the content instance
119:             * @param previewACL      Property ACL of the preview, only relevant for security if <code>previewId</code> &gt; 0
120:             * @param usedPropertyACL relevant property ACL's
121:             */
122:            public FxContentSecurityInfo(FxPK pk, long ownerId, long previewId,
123:                    long typeId, long mandatorId, byte typePermissions,
124:                    int typeACL, int stepACL, int contentACL, int previewACL,
125:                    long[] usedPropertyACL) {
126:                this .pk = pk;
127:                this .ownerId = ownerId;
128:                this .previewId = previewId;
129:                this .typeId = typeId;
130:                this .mandatorId = mandatorId;
131:                this .permissions = typePermissions;
132:                this .typeACL = typeACL;
133:                this .stepACL = stepACL;
134:                this .contentACL = contentACL;
135:                this .previewACL = previewACL;
136:                this .usedPropertyACL = Collections.unmodifiableList(Arrays
137:                        .asList(ArrayUtils.toObject(usedPropertyACL)));
138:            }
139:
140:            /**
141:             * Get the primary key of the content instance this info relates to
142:             *
143:             * @return primary key of the content instance this info relates to
144:             */
145:            public FxPK getPk() {
146:                return pk;
147:            }
148:
149:            /**
150:             * Get the owner of the content
151:             *
152:             * @return owner of the content
153:             */
154:            public long getOwnerId() {
155:                return ownerId;
156:            }
157:
158:            /**
159:             * Getter for the used type id
160:             *
161:             * @return used type id
162:             */
163:            public long getTypeId() {
164:                return typeId;
165:            }
166:
167:            /**
168:             * Get the id of the mandator
169:             *
170:             * @return mandator id
171:             */
172:            public long getMandatorId() {
173:                return mandatorId;
174:            }
175:
176:            /**
177:             * Get the ACL of the type
178:             *
179:             * @return ACL of the type
180:             */
181:            public int getTypeACL() {
182:                return typeACL;
183:            }
184:
185:            /**
186:             * Get the ACL of the step
187:             *
188:             * @return ACL of the step
189:             */
190:            public int getStepACL() {
191:                return stepACL;
192:            }
193:
194:            /**
195:             * Get the ACL of the content instance
196:             *
197:             * @return ACL of the content instance
198:             */
199:            public int getContentACL() {
200:                return contentACL;
201:            }
202:
203:            /**
204:             * Get all used and relevant property ACL's. will be empty if property permissions are disabled for
205:             * the type
206:             *
207:             * @return relevant property ACL's
208:             */
209:            public List<Long> getUsedPropertyACL() {
210:                return usedPropertyACL;
211:            }
212:
213:            /**
214:             * Use permissions at all?
215:             *
216:             * @return if permissions are used at all
217:             */
218:            public boolean usePermissions() {
219:                return permissions != 0;
220:            }
221:
222:            /**
223:             * Get the binary id of the preview
224:             *
225:             * @return binary id of the preview
226:             */
227:            public long getPreviewId() {
228:                return previewId;
229:            }
230:
231:            /**
232:             *
233:             * @return
234:             */
235:            public int getPreviewACL() {
236:                return previewACL;
237:            }
238:
239:            /**
240:             * Use content instance permissions?
241:             *
242:             * @return if content instance permissions are used
243:             */
244:            public boolean useInstancePermissions() {
245:                return (permissions & FxPermissionUtils.PERM_MASK_INSTANCE) == FxPermissionUtils.PERM_MASK_INSTANCE;
246:            }
247:
248:            /**
249:             * Use property permissions?
250:             *
251:             * @return if property permissions are used
252:             */
253:            public boolean usePropertyPermissions() {
254:                return (permissions & FxPermissionUtils.PERM_MASK_PROPERTY) == FxPermissionUtils.PERM_MASK_PROPERTY;
255:            }
256:
257:            /**
258:             * Use step permissions?
259:             *
260:             * @return if step permissions are used
261:             */
262:            public boolean useStepPermissions() {
263:                return (permissions & FxPermissionUtils.PERM_MASK_STEP) == FxPermissionUtils.PERM_MASK_STEP;
264:            }
265:
266:            /**
267:             * Use type permissions?
268:             *
269:             * @return if type permissions are used
270:             */
271:            public boolean useTypePermissions() {
272:                return (permissions & FxPermissionUtils.PERM_MASK_TYPE) == FxPermissionUtils.PERM_MASK_TYPE;
273:            }
274:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.