Interface ILibraryRepository
-
- All Superinterfaces:
IManagedService
public interface ILibraryRepository extends IManagedService
A library repository handling registration, deleting libraries. Also allows to check whether the library is registered in the repository and get a list of all registered libraries.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deleteLibrary(LibraryDescriptor libraryDescriptor)
Deletes the library from the repository.Collection<LibraryDescriptor>
getAllRegisteredLibraries()
Returns the collection of all registered libraries.Collection<LibraryDescriptor>
getAllRegisteredLibraries(LibraryDependency libraryDependency)
Returns the collection of all registered libraries according to the specified dependency on the library.boolean
isLibraryRegistered(LibraryDescriptor libraryDescriptor)
Checks whether the given library is registered in the repository.void
refresh(org.eclipse.core.runtime.IProgressMonitor monitor)
Refreshes the current collection of registered libraries.LibraryDescriptor
registerLibrary(Path libraryPath, org.eclipse.core.runtime.IProgressMonitor monitor)
Registers the library in the repository if such a library has not been registered before.-
Methods inherited from interface com._1c.g5.wiring.IManagedService
activate, deactivate
-
-
-
-
Method Detail
-
registerLibrary
LibraryDescriptor registerLibrary(Path libraryPath, org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException, InvalidLibraryDescriptorException, LibraryLockFailedException
Registers the library in the repository if such a library has not been registered before. If such a library is already registered, then this library descriptor is returned.- Parameters:
libraryPath
- the library file path, cannot benull
monitor
- the monitor to indicate the progress, may benull
- Returns:
- the registered library descriptor, never
null
- Throws:
IOException
- if an I/O error has occurredInvalidLibraryDescriptorException
- if failed to found library description attributesLibraryLockFailedException
- if failed to lock to handle the library
-
deleteLibrary
void deleteLibrary(LibraryDescriptor libraryDescriptor) throws IOException, LibraryLockFailedException
Deletes the library from the repository.- Parameters:
libraryDescriptor
- the library descriptor to delete, cannot benull
- Throws:
IOException
- if an I/O error has occurredLibraryLockFailedException
- if failed to lock to handle the library
-
isLibraryRegistered
boolean isLibraryRegistered(LibraryDescriptor libraryDescriptor)
Checks whether the given library is registered in the repository.- Parameters:
libraryDescriptor
- the library descriptor to check, cannot benull
- Returns:
true
if the library is registered in the repository,false
otherwise
-
getAllRegisteredLibraries
Collection<LibraryDescriptor> getAllRegisteredLibraries()
Returns the collection of all registered libraries.- Returns:
- the unmodifiable collection of all registered libraries, never
null
-
getAllRegisteredLibraries
Collection<LibraryDescriptor> getAllRegisteredLibraries(LibraryDependency libraryDependency)
Returns the collection of all registered libraries according to the specified dependency on the library.- Parameters:
libraryDependency
- the dependency on the library, cannot benull
- Returns:
- the unmodifiable collection of all registered libraries, never
null
-
refresh
void refresh(org.eclipse.core.runtime.IProgressMonitor monitor)
Refreshes the current collection of registered libraries.- Parameters:
monitor
- the monitor to indicate the progress, may benull
-
-