Package org.saidone.service.crypto
Class KeyServiceImpl
java.lang.Object
org.saidone.service.crypto.KeyServiceImpl
- All Implemented Interfaces:
KeyService
@Service
@ConditionalOnExpression("${application.service.vault.encryption.enabled}.equals(true)")
public class KeyServiceImpl
extends Object
implements KeyService
Default
KeyService implementation that re-encrypts node content by
delegating node retrieval to NodeService and content handling to
ContentService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRe-encrypts the node identified by the given ID using the latest key version.voidupdateKeys(int sourceVersion) Re-encrypts all nodes currently protected with the specified key version by delegating each node toupdateKey(String).
-
Constructor Details
-
KeyServiceImpl
public KeyServiceImpl()
-
-
Method Details
-
updateKey
Re-encrypts the node identified by the given ID using the latest key version.The node metadata is loaded from the
NodeService, its content is archived using theContentService, and the updated node is persisted.- Specified by:
updateKeyin interfaceKeyService- Parameters:
nodeId- the Alfresco node identifier
-
updateKeys
public void updateKeys(int sourceVersion) Re-encrypts all nodes currently protected with the specified key version by delegating each node toupdateKey(String).- Specified by:
updateKeysin interfaceKeyService- Parameters:
sourceVersion- the key version currently used by nodes that should be updated
-