com.jamasoftware.contour.dao
Interface SignatureDao


public interface SignatureDao


Method Summary
 void deleteSignature(Signature signature)
          Deletes a Signature permanently
 Signature getLatestSignatureForUserAndScopeRef(java.lang.Integer userId, java.lang.Integer scopeId, java.lang.Integer refId, boolean includeRevoked)
          Gets the latest Signature(by DomainObjectSupport.getCreatedDate()) for a given scope/ref and user.
 java.util.Collection<Signature> getLatestSignaturesForUsersAndScopeRef(java.util.List<java.lang.Integer> userIds, java.lang.Integer scopeId, java.lang.Integer refId, boolean includeRevoked)
          Obtains the latest Signature (by DomainObjectSupport.getCreatedDate()) for each user for the given scope and ref.
 java.util.List<Signature> getSignaturesForScopeRef(java.lang.Integer scopeId, java.lang.Integer refId, boolean includeRevoked)
          Gets Signatures for a given scope/ref
 Signature saveSignature(Signature signature)
          Persists a Signature.
 

Method Detail

getSignaturesForScopeRef

java.util.List<Signature> getSignaturesForScopeRef(java.lang.Integer scopeId,
                                                   java.lang.Integer refId,
                                                   boolean includeRevoked)
Gets Signatures for a given scope/ref

Parameters:
scopeId - scope of the object
refId - refId of the object
includeRevoked - Whether or not to include revoked signatures (see Signature.getIsRevoked())
Returns:
The Signatures for the given object

getLatestSignatureForUserAndScopeRef

Signature getLatestSignatureForUserAndScopeRef(java.lang.Integer userId,
                                               java.lang.Integer scopeId,
                                               java.lang.Integer refId,
                                               boolean includeRevoked)
Gets the latest Signature(by DomainObjectSupport.getCreatedDate()) for a given scope/ref and user. Returns null if not found

Parameters:
scopeId - scope of the object
refId - refId of the object
includeRevoked - Whether or not to include revoked signatures (see Signature.getIsRevoked())
Returns:
The Signatures for the given object

getLatestSignaturesForUsersAndScopeRef

java.util.Collection<Signature> getLatestSignaturesForUsersAndScopeRef(java.util.List<java.lang.Integer> userIds,
                                                                       java.lang.Integer scopeId,
                                                                       java.lang.Integer refId,
                                                                       boolean includeRevoked)
Obtains the latest Signature (by DomainObjectSupport.getCreatedDate()) for each user for the given scope and ref. Users that have no matching Signature will not be associated with any returned Signature s.

Parameters:
userIds - A List of User ids
scopeId - A Scope id
refId - The id of the referenced object determined by the scope
includeRevoked - Whether revoked Signatures should be returned
Returns:
A collection of Signatures for the given scope signed by a User with one of the given ids

saveSignature

Signature saveSignature(Signature signature)
Persists a Signature.

Parameters:
signature - The Signature to save

deleteSignature

void deleteSignature(Signature signature)
Deletes a Signature permanently

Parameters:
signatureId - The Signautre to delete


Copyright (c) 2010 Jama Software, Inc. All Rights Reserved.