Interface IInfobaseAssociationManager
-
- All Superinterfaces:
IManagedService
public interface IInfobaseAssociationManager extends IManagedService
Infobase association manager allows clients to configure projects associations with infobases and track association changes.- See Also:
IInfobaseAssociation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addInfobaseAssociationListener(IInfobaseAssociationListener listener)
Adds the infobase association change listener to service.void
associate(org.eclipse.core.resources.IProject project, InfobaseReference infobase, InfobaseAssociationSettings settings)
Associates the provided project with the provided infobase.void
dissociate(org.eclipse.core.resources.IProject project, InfobaseReference infobase, InfobaseAssociationContext context)
Dissociates the provided project with the provided infobases.Optional<IInfobaseAssociation>
getAssociation(InfobaseReference infobase)
Returnsassociation
of the provided infobase and current infobase association context.Optional<IInfobaseAssociation>
getAssociation(InfobaseReference infobase, InfobaseAssociationContext context)
Returnsassociation
of the provided infobase.Optional<IInfobaseAssociation>
getAssociation(org.eclipse.core.resources.IProject project)
Returnsassociation
of the provided project with infobases and current infobase association context.Optional<IInfobaseAssociation>
getAssociation(org.eclipse.core.resources.IProject project, InfobaseAssociationContext context)
Returnsassociation
of the provided project with infobases.Collection<InfobaseAssociationContext>
getAssociationContexts(org.eclipse.core.resources.IProject project)
Returns a collection of all known infobase association context of the provided project.void
removeInfobaseAssociationListener(IInfobaseAssociationListener listener)
Removes the registered listener from service.void
setDefaultInfobase(org.eclipse.core.resources.IProject project, InfobaseReference infobase, InfobaseAssociationContext context)
Sets the default execution infoabse for the provided infobase association.-
Methods inherited from interface com._1c.g5.wiring.IManagedService
activate, deactivate
-
-
-
-
Method Detail
-
getAssociation
Optional<IInfobaseAssociation> getAssociation(org.eclipse.core.resources.IProject project) throws InfobaseAssociationException
Returnsassociation
of the provided project with infobases and current infobase association context.- Parameters:
project
- the project to get the association for, cannot benull
- Returns:
- an association with provided project infobase if associated
- Throws:
InfobaseAssociationException
- if infobase association management failed with some reason
-
getAssociation
Optional<IInfobaseAssociation> getAssociation(org.eclipse.core.resources.IProject project, InfobaseAssociationContext context) throws InfobaseAssociationException
Returnsassociation
of the provided project with infobases.- Parameters:
project
- the project to get the association for, cannot benull
context
- the infobase association context, cannot benull
- Returns:
- an association with provided project infobase if associated
- Throws:
InfobaseAssociationException
- if infobase association management failed with some reason- See Also:
InfobaseAssociationContext
-
getAssociation
Optional<IInfobaseAssociation> getAssociation(InfobaseReference infobase) throws InfobaseAssociationException
Returnsassociation
of the provided infobase and current infobase association context.- Parameters:
infobase
- the infobase to get an association for, cannot benull
- Returns:
- an association with provided project infobase if associated
- Throws:
InfobaseAssociationException
- if infobase association management failed with some reason
-
getAssociation
Optional<IInfobaseAssociation> getAssociation(InfobaseReference infobase, InfobaseAssociationContext context) throws InfobaseAssociationException
Returnsassociation
of the provided infobase.- Parameters:
infobase
- the infobase to get an association for, cannot benull
context
- the infobase association context, cannot benull
- Returns:
- an association with provided project infobase if associated
- Throws:
InfobaseAssociationException
- if infobase association management failed with some reason- See Also:
InfobaseAssociationContext
-
getAssociationContexts
Collection<InfobaseAssociationContext> getAssociationContexts(org.eclipse.core.resources.IProject project) throws InfobaseAssociationException
Returns a collection of all known infobase association context of the provided project.- Parameters:
project
- the project to get the association contexts for, cannot benull
- Returns:
- a collection of all known infobase association context of the provided project, never
null
- Throws:
InfobaseAssociationException
- if infobase association management failed with some reason
-
associate
void associate(org.eclipse.core.resources.IProject project, InfobaseReference infobase, InfobaseAssociationSettings settings) throws InfobaseAssociationException
Associates the provided project with the provided infobase. One infobase may be associtated with only one project.If
infobase
is already associated with project, that differs from the providedproject
, and association is not forced thenInfobaseAssociationException
will be thrown. Ifinfobase
is already associated with the providedproject
, method does nothing.- Parameters:
project
- the project to associate, cannot benull
infobase
- the infobase to associate, cannot benull
settings
- the infobase association settings, cannot benull
- Throws:
InfobaseAssociationException
- if infobase association management failed with some reason- See Also:
InfobaseAssociationSettings
-
dissociate
void dissociate(org.eclipse.core.resources.IProject project, InfobaseReference infobase, InfobaseAssociationContext context) throws InfobaseAssociationException
Dissociates the provided project with the provided infobases.- Parameters:
project
- the project to disassociate, cannot benull
infobase
- the infobase to disssociate, cannot benull
context
- the infobase association context, cannot benull
- Throws:
InfobaseAssociationException
- if infobase association management failed with some reason- See Also:
InfobaseAssociationContext
-
setDefaultInfobase
void setDefaultInfobase(org.eclipse.core.resources.IProject project, InfobaseReference infobase, InfobaseAssociationContext context) throws InfobaseAssociationException
Sets the default execution infoabse for the provided infobase association. Default infobase will be used to create new project launch configuration, for example.- Parameters:
project
- the project to change default infobase for, cannot benull
defaultInfobase
- new default infobase to set, cannot benull
context
- the infobase association context, cannot benull
- Throws:
InfobaseAssociationException
- if infobase association management failed with some reason- See Also:
InfobaseAssociationContext
-
addInfobaseAssociationListener
void addInfobaseAssociationListener(IInfobaseAssociationListener listener)
Adds the infobase association change listener to service. Listener will be notified about infobase association changes.Causes no effect if provided listener is already registered.
- Parameters:
listener
- the infobase association change listener to add, cannot benull
- See Also:
IInfobaseAssociationListener
-
removeInfobaseAssociationListener
void removeInfobaseAssociationListener(IInfobaseAssociationListener listener)
Removes the registered listener from service. Listener will no longer be notified about infobase association changes.- Parameters:
listener
- the infobase association change listener to remove, cannot benull
- See Also:
IInfobaseAssociationListener
-
-