Package com._1c.g5.v8.dt.xdto.resource
Class CurrentConfigurationPackageProvider
- java.lang.Object
-
- com._1c.g5.v8.dt.xdto.resource.CurrentConfigurationPackageProvider
-
- All Implemented Interfaces:
ICurrentConfigurationPackageProvider
public class CurrentConfigurationPackageProvider extends Object implements ICurrentConfigurationPackageProvider
Default implementation ofICurrentConfigurationPackageProvider.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCURRENT_CONFIG_XDTO_SCHEMEURIscheme for resourceCurrentConfigXdtoResource
-
Constructor Summary
Constructors Constructor Description CurrentConfigurationPackageProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCachedScope()Clears cachingIScope.protected TypecreateAccountingRegisterRecordXdtoObjectType(Type type)CreatesObjectTypecorresponding to the AccountingRegisterRecord producing typeprotected TypecreateAccumulationRegisterRecordXdtoObjectType(Type type)CreatesObjectTypecorresponding to the AccumulationRegisterRecord producing typeprotected TypecreateBusinessProcessObjectXdtoObjectType(Type type)CreatesObjectTypecorresponding to the BusinessProcessObject producing typeprotected TypecreateCalculationRegisterRecordXdtoObjectType(Type type)CreatesObjectTypecorresponding to the CalculationRegisterRecord producing typeprotected TypecreateCatalogObjectXdtoObjectType(Type type)CreatesObjectTypecorresponding to the CatalogObject producing typeprotected TypecreateChartOfAccountsObjectXdtoObjectType(Type type)CreatesObjectTypecorresponding to the ChartOfAccountsObject producing typeprotected TypecreateChartOfCalculationTypesObjectXdtoObjectType(Type type)CreatesObjectTypecorresponding to the ChartOfCalculationTypesObject producing typeprotected TypecreateChartOfCharacteristicTypesObjectXdtoObjectType(Type type, CompatibilityMode compatibilityMode)CreatesObjectTypecorresponding to the ChartOfCharacteristicTypesObject producing typeprotected PackagecreateCurrentConfigPackage(org.eclipse.core.resources.IProject project)CreatesPackagecorresponding to the platform xdto package with uir "http://v8.1c.ru/8.1/data/enterprise/current-config"protected TypecreateDocumentObjectXdtoObjectType(Type type)CreatesObjectTypecorresponding to the DocumentObject producing typeprotected TypecreateExchangePlanObjectXdtoObjectType(Type type)CreatesObjectTypecorresponding to the ExchangePlanObject producing typeprotected TypecreateExternalDataSourceCubeRecordXdtoObjectType(Type type)CreatesObjectTypecorresponding to the External data source CubeRecord producing typeprotected TypecreateExternalDataSourceTableObjectXdtoObjectType(Type type)CreatesObjectTypecorresponding to the External data source TableObject and DimensionTableObject producing typeprotected TypecreateExternalDataSourceTableRecordXdtoObjectType(Type type)CreatesObjectTypecorresponding to the External data source TableRecord producing typeprotected TypecreateInformationRegisterRecordKeyXdtoObjectType(Type type)CreatesObjectTypecorresponding to the InformationRegisterRecordKey producing typeprotected TypecreateInformationRegisterRecordXdtoObjectType(Type type)CreatesObjectTypecorresponding to the InformationRegisterRecord producing typeprotected PropertycreatePropertyByPropertyType(Property property)protected TypecreateRecalculationRecordXdtoObjectType(Type type)CreatesObjectTypecorresponding to the RecalculationRecord producing typeprotected TypecreateRecordSetXdtoObjectType(Type type)CreatesObjectTypecorresponding to the RecordSet producing typeprotected TypecreateRegisterRecordKeyXdtoObjectType(Type type)CreatesObjectTypecorresponding to the RegisterRecordKey producing typeprotected TypecreateSequenceRecordXdtoObjectType(Type type)CreatesObjectTypecorresponding to the SequenceRecord producing typeprotected TypecreateTaskObjectXdtoObjectType(Type type)CreatesObjectTypecorresponding to the TaskObject producing typeprotected TypecreateXdtoObjectType(Type type)CreatesObjectTypecorresponding to the producing type.protected TypecreateXdtoType(Type type, CompatibilityMode compatibilityMode)voiddeleteCurrentConfigPackage(String projectName)Deletes file with content ofPackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"protected booleanexistCurrentConfigPackage(CurrentConfigXdtoResource resource)Checks that file with content of thePackagecorresponding to the platform xdto package with uir "http://v8.1c.ru/8.1/data/enterprise/current-config" existprotected voidfillDependencies(Package xdtoPackage)Creates dependencies of thePackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"static QNamegetBaseRefType()PackagegetCurrentConfigPackage(org.eclipse.core.resources.IProject project)GetsPackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"protected org.eclipse.emf.common.util.URIgetCurrentConfigResourceUri(org.eclipse.core.resources.IProject project)Gets resourceURIof thePackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"protected FilegetResourceLocation(String projectName)Gets file corresponding to theCurrentConfigXdtoResourceby contextIProjectorg.eclipse.xtext.scoping.IScopegetScope(org.eclipse.emf.ecore.resource.Resource context, org.eclipse.emf.ecore.EReference reference)Gets actualIScopeof the element fromPackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"protected booleanhasXdtoType(String typeCategory)Checks that type category produces element of the xdto packageprotected booleanisXdtoValueType(String categoryName)voidloadCurrentConfigResource(CurrentConfigXdtoResource resource)Loads resource forPackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"voidsaveCurrentConfigResource(CurrentConfigXdtoResource resource)Saves resource forPackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"
-
-
-
Field Detail
-
CURRENT_CONFIG_XDTO_SCHEME
public static final String CURRENT_CONFIG_XDTO_SCHEME
URIscheme for resourceCurrentConfigXdtoResource- See Also:
- Constant Field Values
-
-
Method Detail
-
getBaseRefType
public static final QName getBaseRefType()
-
clearCachedScope
public void clearCachedScope()
Description copied from interface:ICurrentConfigurationPackageProviderClears cachingIScope. This method should be called each time when content of the configuration object was changed- Specified by:
clearCachedScopein interfaceICurrentConfigurationPackageProvider
-
getScope
public org.eclipse.xtext.scoping.IScope getScope(org.eclipse.emf.ecore.resource.Resource context, org.eclipse.emf.ecore.EReference reference)Description copied from interface:ICurrentConfigurationPackageProviderGets actualIScopeof the element fromPackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"- Specified by:
getScopein interfaceICurrentConfigurationPackageProvider- Parameters:
context- context resource for creatingIScope, can't benullreference-EReferencefor detect type of the elements inIScope, can't benull- Returns:
- actual
IScopeof the element fromPackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config", nevernull
-
getCurrentConfigPackage
public Package getCurrentConfigPackage(org.eclipse.core.resources.IProject project)
Description copied from interface:ICurrentConfigurationPackageProviderGetsPackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"- Specified by:
getCurrentConfigPackagein interfaceICurrentConfigurationPackageProvider- Parameters:
project- contextIProjectfor gettingPackage, can't benull- Returns:
Packagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"
-
loadCurrentConfigResource
public void loadCurrentConfigResource(CurrentConfigXdtoResource resource)
Description copied from interface:ICurrentConfigurationPackageProviderLoads resource forPackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"- Specified by:
loadCurrentConfigResourcein interfaceICurrentConfigurationPackageProvider- Parameters:
resource- loadingCurrentConfigXdtoResource, can't benull
-
saveCurrentConfigResource
public void saveCurrentConfigResource(CurrentConfigXdtoResource resource)
Description copied from interface:ICurrentConfigurationPackageProviderSaves resource forPackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"- Specified by:
saveCurrentConfigResourcein interfaceICurrentConfigurationPackageProvider- Parameters:
resource- savingCurrentConfigXdtoResource, can't benull
-
deleteCurrentConfigPackage
public void deleteCurrentConfigPackage(String projectName)
Description copied from interface:ICurrentConfigurationPackageProviderDeletes file with content ofPackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"- Specified by:
deleteCurrentConfigPackagein interfaceICurrentConfigurationPackageProvider- Parameters:
projectName- name of the context project for deleting file, can't benull
-
createCurrentConfigPackage
protected Package createCurrentConfigPackage(org.eclipse.core.resources.IProject project)
CreatesPackagecorresponding to the platform xdto package with uir "http://v8.1c.ru/8.1/data/enterprise/current-config"- Parameters:
project- context project for generate content of the creating package, can't benull- Returns:
- created
Packagecorresponding to the platform xdto package with uir "http://v8.1c.ru/8.1/data/enterprise/current-config", nevernull
-
existCurrentConfigPackage
protected boolean existCurrentConfigPackage(CurrentConfigXdtoResource resource)
Checks that file with content of thePackagecorresponding to the platform xdto package with uir "http://v8.1c.ru/8.1/data/enterprise/current-config" exist- Parameters:
resource- specialCurrentConfigXdtoResourceofPackage, can't benull- Returns:
trueif file exists,falseotherwise
-
hasXdtoType
protected boolean hasXdtoType(String typeCategory)
Checks that type category produces element of the xdto package- Parameters:
typeCategory- type category, can't benull- Returns:
trueif checking type category provides element of the xdto package,falseotherwise
-
getCurrentConfigResourceUri
protected org.eclipse.emf.common.util.URI getCurrentConfigResourceUri(org.eclipse.core.resources.IProject project)
Gets resourceURIof thePackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config"- Parameters:
project- context project for generating correctURI, can't benull- Returns:
- resource
URIof thePackagewith uri "http://v8.1c.ru/8.1/data/enterprise/current-config", nevernull
-
createXdtoType
protected Type createXdtoType(Type type, CompatibilityMode compatibilityMode)
- Parameters:
type- producing configurationType, can't benullcompatibilityMode- actual compatibility mode of current configuration, cannot benull- Returns:
- created xdto element (
ValueTypeorObjectType), nevernull
-
getResourceLocation
protected File getResourceLocation(String projectName)
Gets file corresponding to theCurrentConfigXdtoResourceby contextIProject- Parameters:
project- context project for getting file, can't benull- Returns:
- file corresponding to the
CurrentConfigXdtoResource, nevernull
-
createCatalogObjectXdtoObjectType
protected Type createCatalogObjectXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the CatalogObject producing type- Parameters:
type- CatalogObject producing type, can't benull- Returns:
ObjectTypecorresponding to the CatalogObject producing type, nevernull
-
createExternalDataSourceTableObjectXdtoObjectType
protected Type createExternalDataSourceTableObjectXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the External data source TableObject and DimensionTableObject producing type- Parameters:
type- External data source TableObject and DimensionTableObject producing type, can't benull- Returns:
ObjectTypecorresponding to the External data source TableObject and DimensionTableObject producing type, nevernull
-
createDocumentObjectXdtoObjectType
protected Type createDocumentObjectXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the DocumentObject producing type- Parameters:
type- DocumentObject producing type, can't benull- Returns:
ObjectTypecorresponding to the DocumentObject producing type, nevernull
-
createChartOfAccountsObjectXdtoObjectType
protected Type createChartOfAccountsObjectXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the ChartOfAccountsObject producing type- Parameters:
type- ChartOfAccountsObject producing type, can't benull- Returns:
ObjectTypecorresponding to the ChartOfAccountsObject producing type, nevernull
-
createChartOfCharacteristicTypesObjectXdtoObjectType
protected Type createChartOfCharacteristicTypesObjectXdtoObjectType(Type type, CompatibilityMode compatibilityMode)
CreatesObjectTypecorresponding to the ChartOfCharacteristicTypesObject producing type- Parameters:
type- ChartOfCharacteristicTypesObject producing type, can't benullcompatibilityMode- actual compatibility mode of current configuration, cannot benull- Returns:
ObjectTypecorresponding to the ChartOfCharacteristicTypesObject producing type, nevernull
-
createChartOfCalculationTypesObjectXdtoObjectType
protected Type createChartOfCalculationTypesObjectXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the ChartOfCalculationTypesObject producing type- Parameters:
type- ChartOfCalculationTypesObject producing type, can't benull- Returns:
ObjectTypecorresponding to the ChartOfCalculationTypesObject producing type, nevernull
-
createTaskObjectXdtoObjectType
protected Type createTaskObjectXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the TaskObject producing type- Parameters:
type- TaskObject producing type, can't benull- Returns:
ObjectTypecorresponding to the TaskObject producing type, nevernull
-
createBusinessProcessObjectXdtoObjectType
protected Type createBusinessProcessObjectXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the BusinessProcessObject producing type- Parameters:
type- BusinessProcessObject producing type, can't benull- Returns:
ObjectTypecorresponding to the BusinessProcessObject producing type, nevernull
-
createExchangePlanObjectXdtoObjectType
protected Type createExchangePlanObjectXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the ExchangePlanObject producing type- Parameters:
type- ExchangePlanObject producing type, can't benull- Returns:
ObjectTypecorresponding to the ExchangePlanObject producing type, nevernull
-
createInformationRegisterRecordXdtoObjectType
protected Type createInformationRegisterRecordXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the InformationRegisterRecord producing type- Parameters:
type- InformationRegisterRecord producing type, can't benull- Returns:
ObjectTypecorresponding to the InformationRegisterRecord producing type, nevernull
-
createAccumulationRegisterRecordXdtoObjectType
protected Type createAccumulationRegisterRecordXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the AccumulationRegisterRecord producing type- Parameters:
type- AccumulationRegisterRecord producing type, can't benull- Returns:
ObjectTypecorresponding to the AccumulationRegisterRecord producing type, nevernull
-
createAccountingRegisterRecordXdtoObjectType
protected Type createAccountingRegisterRecordXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the AccountingRegisterRecord producing type- Parameters:
type- AccountingRegisterRecord producing type, can't benull- Returns:
ObjectTypecorresponding to the AccountingRegisterRecord producing type, nevernull
-
createCalculationRegisterRecordXdtoObjectType
protected Type createCalculationRegisterRecordXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the CalculationRegisterRecord producing type- Parameters:
type- CalculationRegisterRecord producing type, can't benull- Returns:
ObjectTypecorresponding to the CalculationRegisterRecord producing type, nevernull
-
createRecalculationRecordXdtoObjectType
protected Type createRecalculationRecordXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the RecalculationRecord producing type- Parameters:
type- RecalculationRecord producing type, can't benull- Returns:
ObjectTypecorresponding to the RecalculationRecord producing type, nevernull
-
createSequenceRecordXdtoObjectType
protected Type createSequenceRecordXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the SequenceRecord producing type- Parameters:
type- SequenceRecord producing type, can't benull- Returns:
ObjectTypecorresponding to the SequenceRecord producing type, nevernull
-
createExternalDataSourceTableRecordXdtoObjectType
protected Type createExternalDataSourceTableRecordXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the External data source TableRecord producing type- Parameters:
type- External data source TableRecord producing type, can't benull- Returns:
ObjectTypecorresponding to the External data source TableRecord producing type, nevernull
-
createExternalDataSourceCubeRecordXdtoObjectType
protected Type createExternalDataSourceCubeRecordXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the External data source CubeRecord producing type- Parameters:
type- External data source CubeRecord producing type, can't benull- Returns:
ObjectTypecorresponding to the External data source CubeRecord producing type, nevernull
-
createRecordSetXdtoObjectType
protected Type createRecordSetXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the RecordSet producing type- Parameters:
type- RecordSet producing type, can't benull- Returns:
ObjectTypecorresponding to the RecordSet producing type, nevernull
-
createInformationRegisterRecordKeyXdtoObjectType
protected Type createInformationRegisterRecordKeyXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the InformationRegisterRecordKey producing type- Parameters:
type- InformationRegisterRecordKey producing type, can't benull- Returns:
ObjectTypecorresponding to the InformationRegisterRecordKey producing type, nevernull
-
createRegisterRecordKeyXdtoObjectType
protected Type createRegisterRecordKeyXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the RegisterRecordKey producing type- Parameters:
type- RegisterRecordKey producing type, can't benull- Returns:
ObjectTypecorresponding to the RegisterRecordKey producing type, nevernull
-
createXdtoObjectType
protected Type createXdtoObjectType(Type type)
CreatesObjectTypecorresponding to the producing type. Name of the creating element equals to the type name, also creates properties inObjectTypewith the same name as in producing type. Skips properties with name "LineNumber"- Parameters:
type- producing type, can't benull- Returns:
ObjectTypecorresponding to the producing type, nevernull
-
isXdtoValueType
protected boolean isXdtoValueType(String categoryName)
-
-