Package sonia.scm.repository
Interface RepositoryArchivedCheck
- All Superinterfaces:
ReadOnlyCheck
- All Known Implementing Classes:
EventDrivenRepositoryArchiveCheck
Implementations of this class can be used to check whether a repository is archived.
- Since:
- 2.12.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidThrows aReadOnlyExceptionif the repository with th id is read only.default voidcheck(Repository repository) Throws aReadOnlyExceptionif the repository is read only.default StringReturns the reason for the write protection.booleanisArchived(String repositoryId) default booleanisArchived(Repository repository) Checks whether the given repository is archived or not.default booleanisReadOnly(String repositoryId) Returnstrueif the repository with the given id is read only.Methods inherited from interface sonia.scm.repository.ReadOnlyCheck
isForbidden, isReadOnly, isReadOnly
-
Method Details
-
isArchived
-
isArchived
Checks whether the given repository is archived or not. This checks the status on behalf of the id of the repository, not by the archive flag provided by the repository itself. -
isReadOnly
Description copied from interface:ReadOnlyCheckReturnstrueif the repository with the given id is read only. If this is the case, all permissions not marked "read only" will be denied fot this repository, stores for this repository cannot be written, and calling modifying commands will be prevented. If only special permissions should be forbidden without blocking stores and commands, useReadOnlyCheck.isForbidden(String, String)instead.- Specified by:
isReadOnlyin interfaceReadOnlyCheck- Parameters:
repositoryId- repository id- Returns:
trueif repository is read only- See Also:
-
getReason
Description copied from interface:ReadOnlyCheckReturns the reason for the write protection.- Specified by:
getReasonin interfaceReadOnlyCheck
-
check
Description copied from interface:ReadOnlyCheckThrows aReadOnlyExceptionif the repository is read only.- Specified by:
checkin interfaceReadOnlyCheck- Parameters:
repository- The repository to check for.
-
check
Description copied from interface:ReadOnlyCheckThrows aReadOnlyExceptionif the repository with th id is read only.- Specified by:
checkin interfaceReadOnlyCheck- Parameters:
repositoryId- The id of the repository to check for.
-