Package org.fcrepo.kernel.api.services
Interface MembershipService
-
- All Known Implementing Classes:
MembershipServiceImpl
public interface MembershipService
Service used to manage membership properties of resources- Author:
- bbpennel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
commitTransaction(Transaction transaction)
Commit any pending membership changes.Instant
getLastUpdatedTimestamp(Transaction transaction, FedoraId fedoraId)
Get the timestamp of the most recent member added or removed, or null if none.RdfStream
getMembership(Transaction transaction, FedoraId fedoraId)
Return an RdfStream of membership relations of which the provided resource is the subject.void
populateMembershipHistory(Transaction transaction, FedoraId containerId)
Regenerate the membership history for specified Direct or Indirect container.void
reset()
Truncates the membership index.void
resourceCreated(Transaction transaction, FedoraId fedoraId)
Update membership properties based on the creation of the specified resourcevoid
resourceDeleted(Transaction transaction, FedoraId fedoraId)
Update membership properties based on the deletion of the specified resourcevoid
resourceModified(Transaction transaction, FedoraId fedoraId)
Update membership properties based on the modification of the specified resourcevoid
rollbackTransaction(Transaction transaction)
Rollback any pending membership changes.
-
-
-
Method Detail
-
getMembership
RdfStream getMembership(Transaction transaction, FedoraId fedoraId)
Return an RdfStream of membership relations of which the provided resource is the subject.- Parameters:
transaction
- transactionfedoraId
- the resource to get membership relations for.- Returns:
- RdfStream of membership relations.
-
resourceCreated
void resourceCreated(Transaction transaction, FedoraId fedoraId)
Update membership properties based on the creation of the specified resource- Parameters:
transaction
- transactionfedoraId
- ID of the object created
-
resourceModified
void resourceModified(Transaction transaction, FedoraId fedoraId)
Update membership properties based on the modification of the specified resource- Parameters:
transaction
- transactionfedoraId
- ID of the object modified
-
resourceDeleted
void resourceDeleted(Transaction transaction, FedoraId fedoraId)
Update membership properties based on the deletion of the specified resource- Parameters:
transaction
- transactionfedoraId
- ID of the object deleted
-
populateMembershipHistory
void populateMembershipHistory(Transaction transaction, FedoraId containerId)
Regenerate the membership history for specified Direct or Indirect container.- Parameters:
transaction
- transactioncontainerId
- ID of the container
-
getLastUpdatedTimestamp
Instant getLastUpdatedTimestamp(Transaction transaction, FedoraId fedoraId)
Get the timestamp of the most recent member added or removed, or null if none.- Parameters:
transaction
- transaction or null if nonefedoraId
- the resource id- Returns:
- the timestamp or null
-
commitTransaction
void commitTransaction(Transaction transaction)
Commit any pending membership changes.- Parameters:
transaction
- the transaction
-
rollbackTransaction
void rollbackTransaction(Transaction transaction)
Rollback any pending membership changes.- Parameters:
transaction
- the transaction
-
reset
void reset()
Truncates the membership index. This should only be called when rebuilding the index.
-
-