Interface IApplicationProvisionDelegate
- All Known Implementing Classes:
InfobaseApplicationProvisionDelegate
,ServerApplicationProvisionDelegate
public interface IApplicationProvisionDelegate
The application provision delegate of the specific type of the application.
This interface is intended to be implemented and registered by clients.
-
Method Summary
Modifier and TypeMethodDescriptionfindApplicationByInfobase
(InfobaseReference infobase) Finds an application that uses specified infobase.findApplicationByInfobaseAndProject
(InfobaseReference infobase, org.eclipse.core.resources.IProject project) Finds an application for the specified project that uses specified infobase.getApplications
(org.eclipse.core.resources.IProject project, IApplicationType type) Returns a list of all registered project applications.getLifecycleState
(ILifecycleAware object) Returns the application lifecycle state for the provided application or lifecycle aware artifact.getPublishState
(IApplication application) Returns the application publish state for the provided application.void
initialize
(IApplicationProvisionNotifier notifier, IApplicationAttributeRepository attributeRepository, IApplicationType type) Initializes the application provision delegate with the registered application type and provision notifier.
-
Method Details
-
initialize
void initialize(IApplicationProvisionNotifier notifier, IApplicationAttributeRepository attributeRepository, IApplicationType type) throws ApplicationException Initializes the application provision delegate with the registered application type and provision notifier.- Parameters:
notifier
- the application provision notifier, cannot benull
attributeRepository
- the application attribute repository to use if needed, cannot benull
type
- the application type, cannot benull
- Throws:
ApplicationException
- if method call failed with some reason
-
getApplications
List<IApplication> getApplications(org.eclipse.core.resources.IProject project, IApplicationType type) throws ApplicationException Returns a list of all registered project applications.- Parameters:
project
- the project to get applications for, cannot benull
- Returns:
- a list of all registered project applications, never
null
- Throws:
ApplicationException
- if method call failed with some reason
-
getLifecycleState
Returns the application lifecycle state for the provided application or lifecycle aware artifact. May be unkown.- Parameters:
object
- the object to get state for, cannot benull
- Returns:
- the application lifecycle state, never
null
- Throws:
ApplicationException
- if method call failed with some reason
-
getPublishState
Returns the application publish state for the provided application. May be unkown.- Parameters:
application
- the application to get state for, cannot benull
- Returns:
- the application publish state, never
null
- Throws:
ApplicationException
- if method call failed with some reason
-
findApplicationByInfobase
Optional<IApplication> findApplicationByInfobase(InfobaseReference infobase) throws ApplicationException Finds an application that uses specified infobase. If project is known then consider usingfindApplicationByInfobaseAndProject(com._1c.g5.v8.dt.platform.services.model.InfobaseReference, org.eclipse.core.resources.IProject)
which could much faster.- Parameters:
infobase
- Infobase for which to find application. Must not benull
.- Returns:
- Application that uses specified infobase or an empty value if infobase is not used by any application.
Never
null
. - Throws:
ApplicationException
- If an error occured while searching for matching application.
-
findApplicationByInfobaseAndProject
Optional<IApplication> findApplicationByInfobaseAndProject(InfobaseReference infobase, org.eclipse.core.resources.IProject project) throws ApplicationException Finds an application for the specified project that uses specified infobase. The method is similar tofindApplicationByInfobase(com._1c.g5.v8.dt.platform.services.model.InfobaseReference)
but could be much faster.- Parameters:
infobase
- Infobase for which to search application. Must not benull
.project
- Project for which to search application. Must not benull
.- Returns:
- Application that uses specified infobase and project
or an empty value if infobase is not used by any application in the specified project.
Never
null
. - Throws:
ApplicationException
- If an error occured while searching for matching application.
-