Java Doc for FxPermissionUtils.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 Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.flexive.shared.content.FxPermissionUtils

FxPermissionUtils
public class FxPermissionUtils (Code)
Permission Utilities
author:
   Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)


Field Summary
final public static  bytePERM_MASK_INSTANCE
    
final public static  bytePERM_MASK_PROPERTY
    
final public static  bytePERM_MASK_STEP
    
final public static  bytePERM_MASK_TYPE
    


Method Summary
public static  voidcheckMandatorExistance(long id)
     Check if the mandator with the requested id exists and is active.
public static  booleancheckPermission(UserTicket ticket, long ownerId, ACL.Permission permission, FxType type, long stepACL, long contentACL, boolean throwException)
    
public static  booleancheckPermission(UserTicket ticket, ACL.Permission permission, FxContentSecurityInfo si, boolean throwException)
    
public static  voidcheckPropertyPermissions(FxContent content, ACL.Permission perm)
     Check if the calling user has the requested permission for all properties in this content.
public static  voidcheckRole(UserTicket ticket, Role... roles)
    
public static  voidcheckTypeAvailable(long typeId, boolean allowLocked)
     Check if the requested FxType is available.
public static  byteencodeTypePermissions(boolean useInstancePermissions, boolean usePropertyPermissions, boolean useStepPermissions, boolean useTypePermissions)
    
public static  boolean[]getPermissions(long acl, FxType type, long stepACL, long createdBy, long mandator)
    
public static  StringtoString(byte bitCodedPermissions)
    
public static  voidunwrapNoAccessValues(FxContent content)
     Unwrap all FxNoAccess values to their original values.
public static  voidwrapNoAccessValues(UserTicket ticket, FxContentSecurityInfo securityInfo, FxContent content, FxType type, FxEnvironment env)
    

Field Detail
PERM_MASK_INSTANCE
final public static byte PERM_MASK_INSTANCE(Code)



PERM_MASK_PROPERTY
final public static byte PERM_MASK_PROPERTY(Code)



PERM_MASK_STEP
final public static byte PERM_MASK_STEP(Code)



PERM_MASK_TYPE
final public static byte PERM_MASK_TYPE(Code)





Method Detail
checkMandatorExistance
public static void checkMandatorExistance(long id) throws FxNotFoundException(Code)
Check if the mandator with the requested id exists and is active. Will throw a FxNotFoundException if inactive or not existant.
Parameters:
  id - requested mandator id
throws:
  FxNotFoundException - if inactive or not existant



checkPermission
public static boolean checkPermission(UserTicket ticket, long ownerId, ACL.Permission permission, FxType type, long stepACL, long contentACL, boolean throwException) throws FxNoAccessException(Code)
Permission check for (new) contents
Parameters:
  ticket - calling users ticket
Parameters:
  ownerId - owner of the content to check
Parameters:
  permission - permission to check
Parameters:
  type - used type
Parameters:
  stepACL - step ACL
Parameters:
  contentACL - content ACL
Parameters:
  throwException - should exception be thrown access granted
throws:
  FxNoAccessException - if not accessible for calling user



checkPermission
public static boolean checkPermission(UserTicket ticket, ACL.Permission permission, FxContentSecurityInfo si, boolean throwException) throws FxNoAccessException(Code)
Permission check for existing contents
Parameters:
  ticket - calling users ticket
Parameters:
  permission - permission to check
Parameters:
  si - security info of the content to check
Parameters:
  throwException - should exception be thrown access granted
throws:
  FxNoAccessException - if access denied and exception should be thrown



checkPropertyPermissions
public static void checkPropertyPermissions(FxContent content, ACL.Permission perm) throws FxNotFoundException, FxInvalidParameterException, FxNoAccessException(Code)
Check if the calling user has the requested permission for all properties in this content. Call only if the assigned type uses propery permissions!
Parameters:
  content - content to check
Parameters:
  perm - requested permission
throws:
  FxNotFoundException - on errors
throws:
  FxInvalidParameterException - on errors
throws:
  FxNoAccessException - on errors



checkRole
public static void checkRole(UserTicket ticket, Role... roles) throws FxNoAccessException(Code)
Throw an exception if the calling user is not in the given roles
Parameters:
  ticket - calling user
Parameters:
  roles - Roles to check
throws:
  com.flexive.shared.exceptions.FxNoAccessException - on errors



checkTypeAvailable
public static void checkTypeAvailable(long typeId, boolean allowLocked) throws FxApplicationException(Code)
Check if the requested FxType is available. A FxNotFoundException will be thrown if the FxType's state is TypeState.Unavailable, if allowLocked is true and the FxType's state is TypeState.Locked a FxNoAccessException will be thrown.
Parameters:
  typeId - requested type id to check
Parameters:
  allowLocked - allow a locked state?
throws:
  FxApplicationException - on errors
See Also:   com.flexive.shared.structure.TypeState



encodeTypePermissions
public static byte encodeTypePermissions(boolean useInstancePermissions, boolean usePropertyPermissions, boolean useStepPermissions, boolean useTypePermissions)(Code)
Encode permissions for use in FxType
Parameters:
  useInstancePermissions - instance
Parameters:
  usePropertyPermissions - property
Parameters:
  useStepPermissions - (workflow)step
Parameters:
  useTypePermissions - type encoded permissions



getPermissions
public static boolean[] getPermissions(long acl, FxType type, long stepACL, long createdBy, long mandator) throws FxNoAccessException(Code)
Get a users permission for a given instance ACL
Parameters:
  acl - instance ACL
Parameters:
  type - used type
Parameters:
  stepACL - step ACL
Parameters:
  createdBy - owner
Parameters:
  mandator - mandator array of permissions in the order edit, relate, delete, export and create
throws:
  com.flexive.shared.exceptions.FxNoAccessException - if no read access if permitted



toString
public static String toString(byte bitCodedPermissions)(Code)
Get a human readable form of bit coded permissions
Parameters:
  bitCodedPermissions - permissions human readable form



unwrapNoAccessValues
public static void unwrapNoAccessValues(FxContent content) throws FxNotFoundException, FxInvalidParameterException, FxNoAccessException(Code)
Unwrap all FxNoAccess values to their original values. Must be called as supervisor to work ...
Parameters:
  content - the FxContent to process
throws:
  FxNotFoundException - on errors
throws:
  FxInvalidParameterException - on errors
throws:
  FxNoAccessException - on errors



wrapNoAccessValues
public static void wrapNoAccessValues(UserTicket ticket, FxContentSecurityInfo securityInfo, FxContent content, FxType type, FxEnvironment env) throws FxNotFoundException, FxInvalidParameterException, FxNoAccessException(Code)
Process a contents property and wrap FxValue's in FxNoAccess or set them to readonly where appropriate
Parameters:
  ticket - calling users ticket
Parameters:
  securityInfo - needed security information
Parameters:
  content - the content to process
Parameters:
  type - the content's FxType
Parameters:
  env - environment
throws:
  FxNotFoundException - on errors
throws:
  FxInvalidParameterException - on errors
throws:
  FxNoAccessException - on errors



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.