Interface IModelObjectAdopter
- 
 public interface IModelObjectAdopterAdopter for model objects. May be used to adopt model object to use in V8 configuration extension project. Adopted model objects in extension projects may be used to set as checked or modify original model object properties when extension will be applied to the configuration in the 1C:Enterprise runtime.- See Also:
- IModelObjectAdopterParticipant
- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends org.eclipse.emf.ecore.EObject>
 Tadopt(T source, Version version, org.eclipse.core.runtime.IProgressMonitor monitor)Adopt model object from V8 configuration project to use in V8 configuration extension project.List<org.eclipse.emf.ecore.EObject>adoptAndAttach(List<org.eclipse.emf.ecore.EObject> source, IExtensionProject target, org.eclipse.core.runtime.IProgressMonitor monitor)Adopt a list of model objects from V8 configuration project to use in V8 configuration extension project and attach them to the target V8 extension project configuration and its BM model.<T extends org.eclipse.emf.ecore.EObject>
 TadoptAndAttach(T source, IExtensionProject target, org.eclipse.core.runtime.IProgressMonitor monitor)Adopt model object from V8 configuration project to use in V8 configuration extension project and attach it to the target V8 extension project configuration and its BM model.<T extends org.eclipse.emf.ecore.EObject>
 TgetAdopted(T source, IExtensionProject target)Returns adopted object for the provided modelsourceobject from V8 configuration project, that is contained in the target V8 configuration extension project.<T extends org.eclipse.emf.ecore.EObject>
 TgetSource(T adopted)Returns source native object for the provided modeladoptedobject from V8 configuration extension project.booleanisAdopted(org.eclipse.emf.ecore.EObject source, IExtensionProject target)Returns whether the given source object is already adopted to the target V8 configuration extension project.booleanisUpdatable(org.eclipse.emf.ecore.EObject source, IExtensionProject target)Returns whether the given source object may be updated after adoption to the target V8 configuration extension project.<T extends org.eclipse.emf.ecore.EObject>
 TupdateAdopted(T source, IExtensionProject target, org.eclipse.core.runtime.IProgressMonitor monitor)Updates according adopted model object for the provided source object in the target V8 configuration extension project.
 
- 
- 
- 
Method Detail- 
adopt<T extends org.eclipse.emf.ecore.EObject> T adopt(T source, Version version, org.eclipse.core.runtime.IProgressMonitor monitor)Adopt model object from V8 configuration project to use in V8 configuration extension project. Returned object is not attached to BM model even if the source object is attached. Originalsourceobject remains unchanged during adoption.The provided sourceobject will be adopted by by itself, without children or parents or related objects.Clients may adopt objects and attach it manually: - Adopt object from parent V8 configuration project, that client want to use in extension project.
- Attach it to the required V8 configuration extension project manually.
 - Parameters:
- source- the model object to adopt, cannot be- null
- version- the version of the 1C:Enterprise runtime, cannot be- null
- monitor- the progress monitor to report progress and check cancellation status, or- nullif progress reporting is not desired
- Returns:
- an adopted object, never null
- Throws:
- IllegalArgumentException- if the provided- sourceobject cannot be adopted
 
 - 
adoptAndAttach<T extends org.eclipse.emf.ecore.EObject> T adoptAndAttach(T source, IExtensionProject target, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreExceptionAdopt model object from V8 configuration project to use in V8 configuration extension project and attach it to the target V8 extension project configuration and its BM model. Originalsourceobject remains unchanged during adoption.If the provided sourceobject is top object of the V8 configuration (Catalog or Document for example), then it will be attached to the target project by itself, without children. If the providedsourceobject is not a top object of the V8 configuration (Attribute or Command for example), then it will be adopted with all its parents up to the top object (if they are not adopted yet).Also, some model object adoption may cause other related model objects adoption: for example Catalog Attribute with reference type to other model object will cause this related object adoption and attachment. Examples of model object adoption scenarios: - If clients adopts Catalog to the target extension project, only this Catalog will be adopted the target extension configuration without any children.
- If clients adopts Catalog Attribute with primitive type to the target extension project, then this Attribute parent Catalog will be adopted with this Attribute as children.
- If clients adopts Catalog Attribute with reference type to some Document to the target extension project, then this Document will be adopted adn this Attribute parent Catalog will be adopted with this Attribute as children.
 Returns the adopted object, attached to the targetproject.- Parameters:
- source- the model object to adopt, cannot be- null
- target- the target V8 extension configuration project, cannot be- null
- monitor- the progress monitor to report progress and check cancellation status, or- nullif progress reporting is not desired
- Returns:
- an adopted object, never null
- Throws:
- IllegalArgumentException- if the provided- sourceobject cannot be adopted
- org.eclipse.core.runtime.CoreException- if the adoption or attachment error occurred
 
 - 
adoptAndAttachList<org.eclipse.emf.ecore.EObject> adoptAndAttach(List<org.eclipse.emf.ecore.EObject> source, IExtensionProject target, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException Adopt a list of model objects from V8 configuration project to use in V8 configuration extension project and attach them to the target V8 extension project configuration and its BM model. Originalsourceobjects remains unchanged during adoption. SeeadoptAndAttach(EObject, IExtensionProject, IProgressMonitor)for examples of model object adoption process.Returns a list of adopted objects in the same order, attached to the targetproject.- Parameters:
- source- a list of model objects to adopt, cannot be- null
- target- the target V8 extension configuration project, cannot be- null
- monitor- the progress monitor to report progress and check cancellation status, or- nullif progress reporting is not desired
- Returns:
- a list of adopted objects in the same order, never null
- Throws:
- org.eclipse.core.runtime.CoreException- if the adoption or attachment error occurred
 
 - 
getAdopted<T extends org.eclipse.emf.ecore.EObject> T getAdopted(T source, IExtensionProject target)Returns adopted object for the provided modelsourceobject from V8 configuration project, that is contained in the target V8 configuration extension project.May return nullif the provided object is not adopted yet to thetargetproject.- Parameters:
- source- the model object to get adopted for, cannot be- null
- target- the target V8 extension configuration project, cannot be- null
- Returns:
- the adopted object for the provided model sourceobject that is contained in thetargetproject, ornullif not adopted yet
- Throws:
- IllegalArgumentException- if the provided- sourceobject cannot be adopted
 
 - 
getSource<T extends org.eclipse.emf.ecore.EObject> T getSource(T adopted) Returns source native object for the provided modeladoptedobject from V8 configuration extension project. Result source object will belong to parent configuration project.May return nullif the provided object extension project has no parent or source object not found in parent project.- Parameters:
- adopted- the model object to get source for, cannot be- null
- Returns:
- source object for the provided model adoptedobject from V8 configuration extension project ornullif not found
- Throws:
- IllegalArgumentException- if the provided- sourceobject is not contained in extension project
 
 - 
isAdoptedboolean isAdopted(org.eclipse.emf.ecore.EObject source, IExtensionProject target)Returns whether the given source object is already adopted to the target V8 configuration extension project.- Parameters:
- source- the model object to check, cannot be- null
- target- the target V8 extension configuration project, cannot be- null
- Returns:
- whether the given source object is already adopted to the target V8 configuration extension project
- Throws:
- IllegalArgumentException- if the provided- sourceobject cannot be adopted
 
 - 
isUpdatableboolean isUpdatable(org.eclipse.emf.ecore.EObject source, IExtensionProject target)Returns whether the given source object may be updated after adoption to the target V8 configuration extension project.- Parameters:
- source- the model object to check, cannot be- null
- target- the target V8 extension configuration, cannot be- null
- Returns:
- whether the given source object may be updated after adoption to the target V8 configuration extension project
- Throws:
- IllegalArgumentException- if the provided- sourceobject cannot be adopted
 
 - 
updateAdopted<T extends org.eclipse.emf.ecore.EObject> T updateAdopted(T source, IExtensionProject target, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreExceptionUpdates according adopted model object for the provided source object in the target V8 configuration extension project. Adopted object will be updated according to the providedsourceobject state. Originalsourceobject remains unchanged during adopted object update.- Parameters:
- source- the model object to update adopted object for, cannot be- null
- target- the target V8 extension configuration project, cannot be- null
- monitor- the progress monitor to report progress and check cancellation status, or- nullif progress reporting is not desired
- Returns:
- returns the updated according adopted model object, never null
- Throws:
- IllegalArgumentException- when:- the provided sourceobject cannot be adopted
- the provided sourceobject can be adopted but it is not adopted yet
- the provided sourceobject cannot be updated after adoption
 
- the provided 
- org.eclipse.core.runtime.CoreException- if the update error occurred
 
 
- 
 
-