Package org.fcrepo.kernel.api.services
Interface MembershipService
public interface MembershipService
Service used to manage membership properties of resources
- Author:
- bbpennel
-
Method Summary
Modifier and TypeMethodDescriptionvoidClear all transactions in the membership index.voidcommitTransaction(Transaction transaction) Commit any pending membership changes.getLastUpdatedTimestamp(Transaction transaction, FedoraId fedoraId) Get the timestamp of the most recent member added or removed, or null if none.getMembership(Transaction transaction, FedoraId fedoraId) Return an RdfStream of membership relations of which the provided resource is the subject.voidpopulateMembershipHistory(Transaction transaction, FedoraId containerId) Regenerate the membership history for specified Direct or Indirect container.voidreset()Truncates the membership index.voidresourceCreated(Transaction transaction, FedoraId fedoraId) Update membership properties based on the creation of the specified resourcevoidresourceDeleted(Transaction transaction, FedoraId fedoraId) Update membership properties based on the deletion of the specified resourcevoidresourceModified(Transaction transaction, FedoraId fedoraId) Update membership properties based on the modification of the specified resourcevoidrollbackTransaction(Transaction transaction) Rollback any pending membership changes.
-
Method Details
-
getMembership
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
Update membership properties based on the creation of the specified resource- Parameters:
transaction- transactionfedoraId- ID of the object created
-
resourceModified
Update membership properties based on the modification of the specified resource- Parameters:
transaction- transactionfedoraId- ID of the object modified
-
resourceDeleted
Update membership properties based on the deletion of the specified resource- Parameters:
transaction- transactionfedoraId- ID of the object deleted
-
populateMembershipHistory
Regenerate the membership history for specified Direct or Indirect container.- Parameters:
transaction- transactioncontainerId- ID of the container
-
getLastUpdatedTimestamp
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
Commit any pending membership changes.- Parameters:
transaction- the transaction
-
rollbackTransaction
Rollback any pending membership changes.- Parameters:
transaction- the transaction
-
clearAllTransactions
void clearAllTransactions()Clear all transactions in the membership index. -
reset
void reset()Truncates the membership index. This should only be called when rebuilding the index.
-