Package com.jalios.jcms.member
Class MemberDeleteManager
- java.lang.Object
-
- com.jalios.jcms.member.MemberDeleteManager
-
public class MemberDeleteManager extends java.lang.Object
Manager handling asynchronous Member deletion request.- Since:
- 10.0.7 / JCMS-9292
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getAsyncDeleteMaxTimeout()
Retrieve the timeout (in milliseconds) to use when waiting for async request in "legacy" synchronous code.static MemberDeleteManager
getInstance()
boolean
hasPendingDeletion(Member member)
Check a deletion of the specified member has been requestedboolean
hasPendingDeletions()
Check if there are any pendingboolean
isAsyncDeleteEnabled()
Checks if asynchronous deletion of Member is enabled.java.util.concurrent.CompletableFuture<java.lang.Void>
requestMemberDeletion(Member opAuthor, Member memberToDelete, java.util.Map<java.lang.String,?> contextMap)
Request a deletion of memberToDelete by opAuthor.
-
-
-
Method Detail
-
getInstance
public static final MemberDeleteManager getInstance()
-
isAsyncDeleteEnabled
public boolean isAsyncDeleteEnabled()
Checks if asynchronous deletion of Member is enabled.Property :
member.async-delete.enabled: true
- Returns:
- true if enabled, false otherwise
-
getAsyncDeleteMaxTimeout
public long getAsyncDeleteMaxTimeout()
Retrieve the timeout (in milliseconds) to use when waiting for async request in "legacy" synchronous code.Default is 0, to wait forever.
Property :
member.async-delete.timeout: 0
- Returns:
- a duration in milliseconds
-
hasPendingDeletions
public boolean hasPendingDeletions()
Check if there are any pending- Returns:
- true if there are member pending deletion, false otherwise
-
hasPendingDeletion
public boolean hasPendingDeletion(Member member)
Check a deletion of the specified member has been requested- Parameters:
member
- a Member- Returns:
- true if member is schedule for deletion, false otherwise
-
requestMemberDeletion
public java.util.concurrent.CompletableFuture<java.lang.Void> requestMemberDeletion(Member opAuthor, Member memberToDelete, java.util.Map<java.lang.String,?> contextMap)
Request a deletion of memberToDelete by opAuthor.- Parameters:
opAuthor
- the member performing the deletionmemberToDelete
- the member to delete, must not be null- Returns:
- a CompletableFuture (never return null, return an already completed future if specified memberToDelete is null)
-
-