it.sistematica.isharedoc.service
Class InstanceSecurityServiceImpl

java.lang.Object
  extended by it.sistematica.isharedoc.service.InstanceSecurityServiceImpl
All Implemented Interfaces:
InstanceSecurityService

public class InstanceSecurityServiceImpl
extends java.lang.Object
implements InstanceSecurityService


Nested Class Summary
 class InstanceSecurityServiceImpl.InstanceAclItem
           
 
Field Summary
(package private)  DocumentManager documentManager
           
(package private)  it.neverworks.data.EntityManager entities
           
(package private)  it.neverworks.cache.ehcache.EhCache<java.util.Map<java.lang.String,InstanceSecurityServiceImpl.InstanceAclItem>> instanceAclCache
           
(package private)  it.neverworks.cache.ehcache.EhCache<java.util.Map<java.lang.String,InstanceSecurityServiceImpl.InstanceAclItem>> instanceAttachmentAclCache
           
(package private)  InstanceService instanceService
           
(package private)  WorkTaskManager taskManager
           
(package private)  it.neverworks.application.service.UserInfo userInfo
           
 
Constructor Summary
InstanceSecurityServiceImpl()
           
 
Method Summary
 boolean canAdmin(ItemInstance instance)
          Can admin.
 boolean canAdminAttachments(ItemInstance instance)
          Can admin attachments.
 boolean canCreate(ItemInstance instance)
          Can create.
 boolean canCreateAttachments(ItemInstance instance)
          Can create attachments.
 boolean canDelete(ItemInstance instance)
          Can delete.
 boolean canDeleteAttachments(ItemInstance instance)
          Can delete attachments.
 boolean canRead(ItemInstance instance)
          Can read.
 boolean canReadAttachments(ItemInstance instance)
          Can read attachments.
 boolean canWrite(ItemInstance instance)
          Can write.
 boolean canWriteAttachments(ItemInstance instance)
          Can write attachments.
 void clearAcl(ItemInstance instance)
          Clear acl.
 InstanceSecurityServiceImpl.InstanceAclItem getAcl(ItemInstance instance)
          Gets the acl.
 InstanceSecurityServiceImpl.InstanceAclItem getAcl(ItemInstance instance, boolean rebuildCache, java.util.List<java.lang.String> trace)
          Gets the acl.
 java.lang.String getBodyHTMLSecured(MessageInstance instance)
          Gets the body html secured.
 java.lang.String getContentSecured(MessageInstance instance)
          Gets the content secured.
 java.lang.String getSubject256Secured(MessageInstance instance)
          Gets the subject256 secured.
 java.lang.String getSubjectSecured(MessageInstance instance)
          Gets the subject secured.
 java.lang.String getTitleSubjectSecured(ItemInstance instance)
          Gets the title subject secured.
 void permissionAdd(ContactInstance contactInstance)
          Permission add.
 void permissionRemove(ContactInstance contactInstance)
          Permission remove.
 void permissionsRepair(File file, java.util.List<MessageBoxPermission> mboxPermissions, java.util.List<StoryboardPermission> sbPermissions, java.util.List<ContactInstance> contactInstances, java.util.Map<java.lang.String,java.lang.String> runtimeTasks)
          Permissions repair.
 void permissionsRepair(ItemInstance instance)
          Permissions repair.
 void permissionsRepairContacts(java.util.List<ContactInstance> contacts, MessageServiceInstance messageServiceInstance)
          Permissions repair contacts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userInfo

it.neverworks.application.service.UserInfo userInfo

entities

it.neverworks.data.EntityManager entities

documentManager

DocumentManager documentManager

instanceService

InstanceService instanceService

taskManager

WorkTaskManager taskManager

instanceAclCache

it.neverworks.cache.ehcache.EhCache<java.util.Map<java.lang.String,InstanceSecurityServiceImpl.InstanceAclItem>> instanceAclCache

instanceAttachmentAclCache

it.neverworks.cache.ehcache.EhCache<java.util.Map<java.lang.String,InstanceSecurityServiceImpl.InstanceAclItem>> instanceAttachmentAclCache
Constructor Detail

InstanceSecurityServiceImpl

public InstanceSecurityServiceImpl()
Method Detail

permissionsRepair

@Transactional
public void permissionsRepair(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Permissions repair.

Specified by:
permissionsRepair in interface InstanceSecurityService
Parameters:
instance - the instance

permissionsRepairContacts

@Transactional
public void permissionsRepairContacts(java.util.List<ContactInstance> contacts,
                                                    MessageServiceInstance messageServiceInstance)
Description copied from interface: InstanceSecurityService
Permissions repair contacts.

Specified by:
permissionsRepairContacts in interface InstanceSecurityService
Parameters:
contacts - the contacts
messageServiceInstance - the message service instance

permissionsRepair

@Transactional
public void permissionsRepair(File file,
                                            java.util.List<MessageBoxPermission> mboxPermissions,
                                            java.util.List<StoryboardPermission> sbPermissions,
                                            java.util.List<ContactInstance> contactInstances,
                                            java.util.Map<java.lang.String,java.lang.String> runtimeTasks)
Description copied from interface: InstanceSecurityService
Permissions repair.

Specified by:
permissionsRepair in interface InstanceSecurityService
Parameters:
file - the file
mboxPermissions - the mbox permissions
sbPermissions - the sb permissions
contactInstances - the contact instances
runtimeTasks - the runtime tasks

permissionAdd

@Transactional
public void permissionAdd(ContactInstance contactInstance)
Description copied from interface: InstanceSecurityService
Permission add.

Specified by:
permissionAdd in interface InstanceSecurityService
Parameters:
contactInstance - the contact instance

permissionRemove

@Transactional
public void permissionRemove(ContactInstance contactInstance)
Description copied from interface: InstanceSecurityService
Permission remove.

Specified by:
permissionRemove in interface InstanceSecurityService
Parameters:
contactInstance - the contact instance

getSubjectSecured

public java.lang.String getSubjectSecured(MessageInstance instance)
Description copied from interface: InstanceSecurityService
Gets the subject secured.

Specified by:
getSubjectSecured in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
the subject secured

getSubject256Secured

public java.lang.String getSubject256Secured(MessageInstance instance)
Description copied from interface: InstanceSecurityService
Gets the subject256 secured.

Specified by:
getSubject256Secured in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
the subject256 secured

getContentSecured

public java.lang.String getContentSecured(MessageInstance instance)
Description copied from interface: InstanceSecurityService
Gets the content secured.

Specified by:
getContentSecured in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
the content secured

getTitleSubjectSecured

public java.lang.String getTitleSubjectSecured(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Gets the title subject secured.

Specified by:
getTitleSubjectSecured in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
the title subject secured

getBodyHTMLSecured

public java.lang.String getBodyHTMLSecured(MessageInstance instance)
Description copied from interface: InstanceSecurityService
Gets the body html secured.

Specified by:
getBodyHTMLSecured in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
the body html secured

getAcl

@Transactional
public InstanceSecurityServiceImpl.InstanceAclItem getAcl(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Gets the acl.

Specified by:
getAcl in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
the acl

getAcl

@Transactional
public InstanceSecurityServiceImpl.InstanceAclItem getAcl(ItemInstance instance,
                                                                        boolean rebuildCache,
                                                                        java.util.List<java.lang.String> trace)
Description copied from interface: InstanceSecurityService
Gets the acl.

Specified by:
getAcl in interface InstanceSecurityService
Parameters:
instance - the instance
rebuildCache - the rebuild cache
trace - the trace
Returns:
the acl

clearAcl

public void clearAcl(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Clear acl.

Specified by:
clearAcl in interface InstanceSecurityService
Parameters:
instance - the instance

canCreate

public boolean canCreate(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Can create.

Specified by:
canCreate in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
true, if successful

canRead

public boolean canRead(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Can read.

Specified by:
canRead in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
true, if successful

canWrite

public boolean canWrite(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Can write.

Specified by:
canWrite in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
true, if successful

canDelete

public boolean canDelete(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Can delete.

Specified by:
canDelete in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
true, if successful

canAdmin

public boolean canAdmin(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Can admin.

Specified by:
canAdmin in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
true, if successful

canCreateAttachments

public boolean canCreateAttachments(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Can create attachments.

Specified by:
canCreateAttachments in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
true, if successful

canReadAttachments

public boolean canReadAttachments(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Can read attachments.

Specified by:
canReadAttachments in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
true, if successful

canWriteAttachments

public boolean canWriteAttachments(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Can write attachments.

Specified by:
canWriteAttachments in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
true, if successful

canDeleteAttachments

public boolean canDeleteAttachments(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Can delete attachments.

Specified by:
canDeleteAttachments in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
true, if successful

canAdminAttachments

public boolean canAdminAttachments(ItemInstance instance)
Description copied from interface: InstanceSecurityService
Can admin attachments.

Specified by:
canAdminAttachments in interface InstanceSecurityService
Parameters:
instance - the instance
Returns:
true, if successful