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 of ICurrentConfigurationPackageProvider.
  • Field Details

  • Constructor Details

    • CurrentConfigurationPackageProvider

      public CurrentConfigurationPackageProvider()
  • Method Details

    • getBaseRefType

      public static final QName getBaseRefType()
    • clearCachedScope

      public void clearCachedScope()
      Description copied from interface: ICurrentConfigurationPackageProvider
      Clears caching IScope. This method should be called each time when content of the configuration object was changed
      Specified by:
      clearCachedScope in interface ICurrentConfigurationPackageProvider
    • 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: ICurrentConfigurationPackageProvider
      Gets actual IScope of the element from Package with uri "http://v8.1c.ru/8.1/data/enterprise/current-config"
      Specified by:
      getScope in interface ICurrentConfigurationPackageProvider
      Parameters:
      context - context resource for creating IScope, can't be null
      reference - EReference for detect type of the elements in IScope, can't be null
      Returns:
      actual IScope of the element from Package with uri "http://v8.1c.ru/8.1/data/enterprise/current-config", never null
    • getCurrentConfigPackage

      public Package getCurrentConfigPackage(org.eclipse.core.resources.IProject project)
      Description copied from interface: ICurrentConfigurationPackageProvider
      Gets Package with uri "http://v8.1c.ru/8.1/data/enterprise/current-config"
      Specified by:
      getCurrentConfigPackage in interface ICurrentConfigurationPackageProvider
      Parameters:
      project - context IProject for getting Package, can't be null
      Returns:
      Package with uri "http://v8.1c.ru/8.1/data/enterprise/current-config"
    • loadCurrentConfigResource

      public void loadCurrentConfigResource(CurrentConfigXdtoResource resource)
      Description copied from interface: ICurrentConfigurationPackageProvider
      Loads resource for Package with uri "http://v8.1c.ru/8.1/data/enterprise/current-config"
      Specified by:
      loadCurrentConfigResource in interface ICurrentConfigurationPackageProvider
      Parameters:
      resource - loading CurrentConfigXdtoResource, can't be null
    • saveCurrentConfigResource

      public void saveCurrentConfigResource(CurrentConfigXdtoResource resource)
      Description copied from interface: ICurrentConfigurationPackageProvider
      Saves resource for Package with uri "http://v8.1c.ru/8.1/data/enterprise/current-config"
      Specified by:
      saveCurrentConfigResource in interface ICurrentConfigurationPackageProvider
      Parameters:
      resource - saving CurrentConfigXdtoResource, can't be null
    • deleteCurrentConfigPackage

      public void deleteCurrentConfigPackage(String projectName)
      Description copied from interface: ICurrentConfigurationPackageProvider
      Deletes file with content of Package with uri "http://v8.1c.ru/8.1/data/enterprise/current-config"
      Specified by:
      deleteCurrentConfigPackage in interface ICurrentConfigurationPackageProvider
      Parameters:
      projectName - name of the context project for deleting file, can't be null
    • createCurrentConfigPackage

      protected Package createCurrentConfigPackage(org.eclipse.core.resources.IProject project)
      Creates Package corresponding 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 be null
      Returns:
      created Package corresponding to the platform xdto package with uir "http://v8.1c.ru/8.1/data/enterprise/current-config", never null
    • existCurrentConfigPackage

      protected boolean existCurrentConfigPackage(CurrentConfigXdtoResource resource)
      Checks that file with content of the Package corresponding to the platform xdto package with uir "http://v8.1c.ru/8.1/data/enterprise/current-config" exist
      Parameters:
      resource - special CurrentConfigXdtoResource of Package, can't be null
      Returns:
      true if file exists, false otherwise
    • hasXdtoType

      protected boolean hasXdtoType(String typeCategory)
      Checks that type category produces element of the xdto package
      Parameters:
      typeCategory - type category, can't be null
      Returns:
      true if checking type category provides element of the xdto package, false otherwise
    • getCurrentConfigResourceUri

      protected org.eclipse.emf.common.util.URI getCurrentConfigResourceUri(org.eclipse.core.resources.IProject project)
      Gets resource URI of the Package with uri "http://v8.1c.ru/8.1/data/enterprise/current-config"
      Parameters:
      project - context project for generating correct URI, can't be null
      Returns:
      resource URI of the Package with uri "http://v8.1c.ru/8.1/data/enterprise/current-config", never null
    • createXdtoType

      protected Type createXdtoType(Type type, CompatibilityMode compatibilityMode)
      Creates xdto element (ValueType or ObjectType) by Type
      Parameters:
      type - producing configuration Type, can't be null
      compatibilityMode - actual compatibility mode of current configuration, cannot be null
      Returns:
      created xdto element (ValueType or ObjectType), never null
    • getResourceLocation

      protected File getResourceLocation(String projectName)
      Gets file corresponding to the CurrentConfigXdtoResource by context IProject
      Parameters:
      project - context project for getting file, can't be null
      Returns:
      file corresponding to the CurrentConfigXdtoResource, never null
    • createCatalogObjectXdtoObjectType

      protected Type createCatalogObjectXdtoObjectType(Type type)
      Creates ObjectType corresponding to the CatalogObject producing type
      Parameters:
      type - CatalogObject producing type, can't be null
      Returns:
      ObjectType corresponding to the CatalogObject producing type, never null
    • createExternalDataSourceTableObjectXdtoObjectType

      protected Type createExternalDataSourceTableObjectXdtoObjectType(Type type)
      Creates ObjectType corresponding to the External data source TableObject and DimensionTableObject producing type
      Parameters:
      type - External data source TableObject and DimensionTableObject producing type, can't be null
      Returns:
      ObjectType corresponding to the External data source TableObject and DimensionTableObject producing type, never null
    • createDocumentObjectXdtoObjectType

      protected Type createDocumentObjectXdtoObjectType(Type type)
      Creates ObjectType corresponding to the DocumentObject producing type
      Parameters:
      type - DocumentObject producing type, can't be null
      Returns:
      ObjectType corresponding to the DocumentObject producing type, never null
    • createChartOfAccountsObjectXdtoObjectType

      protected Type createChartOfAccountsObjectXdtoObjectType(Type type)
      Creates ObjectType corresponding to the ChartOfAccountsObject producing type
      Parameters:
      type - ChartOfAccountsObject producing type, can't be null
      Returns:
      ObjectType corresponding to the ChartOfAccountsObject producing type, never null
    • createChartOfCharacteristicTypesObjectXdtoObjectType

      protected Type createChartOfCharacteristicTypesObjectXdtoObjectType(Type type, CompatibilityMode compatibilityMode)
      Creates ObjectType corresponding to the ChartOfCharacteristicTypesObject producing type
      Parameters:
      type - ChartOfCharacteristicTypesObject producing type, can't be null
      compatibilityMode - actual compatibility mode of current configuration, cannot be null
      Returns:
      ObjectType corresponding to the ChartOfCharacteristicTypesObject producing type, never null
    • createChartOfCalculationTypesObjectXdtoObjectType

      protected Type createChartOfCalculationTypesObjectXdtoObjectType(Type type)
      Creates ObjectType corresponding to the ChartOfCalculationTypesObject producing type
      Parameters:
      type - ChartOfCalculationTypesObject producing type, can't be null
      Returns:
      ObjectType corresponding to the ChartOfCalculationTypesObject producing type, never null
    • createTaskObjectXdtoObjectType

      protected Type createTaskObjectXdtoObjectType(Type type)
      Creates ObjectType corresponding to the TaskObject producing type
      Parameters:
      type - TaskObject producing type, can't be null
      Returns:
      ObjectType corresponding to the TaskObject producing type, never null
    • createBusinessProcessObjectXdtoObjectType

      protected Type createBusinessProcessObjectXdtoObjectType(Type type)
      Creates ObjectType corresponding to the BusinessProcessObject producing type
      Parameters:
      type - BusinessProcessObject producing type, can't be null
      Returns:
      ObjectType corresponding to the BusinessProcessObject producing type, never null
    • createExchangePlanObjectXdtoObjectType

      protected Type createExchangePlanObjectXdtoObjectType(Type type)
      Creates ObjectType corresponding to the ExchangePlanObject producing type
      Parameters:
      type - ExchangePlanObject producing type, can't be null
      Returns:
      ObjectType corresponding to the ExchangePlanObject producing type, never null
    • createInformationRegisterRecordXdtoObjectType

      protected Type createInformationRegisterRecordXdtoObjectType(Type type)
      Creates ObjectType corresponding to the InformationRegisterRecord producing type
      Parameters:
      type - InformationRegisterRecord producing type, can't be null
      Returns:
      ObjectType corresponding to the InformationRegisterRecord producing type, never null
    • createAccumulationRegisterRecordXdtoObjectType

      protected Type createAccumulationRegisterRecordXdtoObjectType(Type type)
      Creates ObjectType corresponding to the AccumulationRegisterRecord producing type
      Parameters:
      type - AccumulationRegisterRecord producing type, can't be null
      Returns:
      ObjectType corresponding to the AccumulationRegisterRecord producing type, never null
    • createAccountingRegisterRecordXdtoObjectType

      protected Type createAccountingRegisterRecordXdtoObjectType(Type type)
      Creates ObjectType corresponding to the AccountingRegisterRecord producing type
      Parameters:
      type - AccountingRegisterRecord producing type, can't be null
      Returns:
      ObjectType corresponding to the AccountingRegisterRecord producing type, never null
    • createCalculationRegisterRecordXdtoObjectType

      protected Type createCalculationRegisterRecordXdtoObjectType(Type type)
      Creates ObjectType corresponding to the CalculationRegisterRecord producing type
      Parameters:
      type - CalculationRegisterRecord producing type, can't be null
      Returns:
      ObjectType corresponding to the CalculationRegisterRecord producing type, never null
    • createRecalculationRecordXdtoObjectType

      protected Type createRecalculationRecordXdtoObjectType(Type type)
      Creates ObjectType corresponding to the RecalculationRecord producing type
      Parameters:
      type - RecalculationRecord producing type, can't be null
      Returns:
      ObjectType corresponding to the RecalculationRecord producing type, never null
    • createSequenceRecordXdtoObjectType

      protected Type createSequenceRecordXdtoObjectType(Type type)
      Creates ObjectType corresponding to the SequenceRecord producing type
      Parameters:
      type - SequenceRecord producing type, can't be null
      Returns:
      ObjectType corresponding to the SequenceRecord producing type, never null
    • createExternalDataSourceTableRecordXdtoObjectType

      protected Type createExternalDataSourceTableRecordXdtoObjectType(Type type)
      Creates ObjectType corresponding to the External data source TableRecord producing type
      Parameters:
      type - External data source TableRecord producing type, can't be null
      Returns:
      ObjectType corresponding to the External data source TableRecord producing type, never null
    • createExternalDataSourceCubeRecordXdtoObjectType

      protected Type createExternalDataSourceCubeRecordXdtoObjectType(Type type)
      Creates ObjectType corresponding to the External data source CubeRecord producing type
      Parameters:
      type - External data source CubeRecord producing type, can't be null
      Returns:
      ObjectType corresponding to the External data source CubeRecord producing type, never null
    • createRecordSetXdtoObjectType

      protected Type createRecordSetXdtoObjectType(Type type)
      Creates ObjectType corresponding to the RecordSet producing type
      Parameters:
      type - RecordSet producing type, can't be null
      Returns:
      ObjectType corresponding to the RecordSet producing type, never null
    • createInformationRegisterRecordKeyXdtoObjectType

      protected Type createInformationRegisterRecordKeyXdtoObjectType(Type type)
      Creates ObjectType corresponding to the InformationRegisterRecordKey producing type
      Parameters:
      type - InformationRegisterRecordKey producing type, can't be null
      Returns:
      ObjectType corresponding to the InformationRegisterRecordKey producing type, never null
    • createRegisterRecordKeyXdtoObjectType

      protected Type createRegisterRecordKeyXdtoObjectType(Type type)
      Creates ObjectType corresponding to the RegisterRecordKey producing type
      Parameters:
      type - RegisterRecordKey producing type, can't be null
      Returns:
      ObjectType corresponding to the RegisterRecordKey producing type, never null
    • createXdtoObjectType

      protected Type createXdtoObjectType(Type type)
      Creates ObjectType corresponding to the producing type. Name of the creating element equals to the type name, also creates properties in ObjectType with the same name as in producing type. Skips properties with name "LineNumber"
      Parameters:
      type - producing type, can't be null
      Returns:
      ObjectType corresponding to the producing type, never null
    • createPropertyByPropertyType

      protected Property createPropertyByPropertyType(Property property)
      Creates QName corresponding to the Type by types in Property
      Parameters:
      property - Property for getting list of TypeItem, can't be null
      Returns:
      QName corresponding to the Type by types in Property, never null
    • isXdtoValueType

      protected boolean isXdtoValueType(String categoryName)
      Checks that this type category of Type corresponding to the element of xdto ValueType
      Parameters:
      categoryName - checkign type category of Type, can't be null
      Returns:
      true if his type category of Type corresponding to the element of xdto ValueType, false otherwise
    • fillDependencies

      protected void fillDependencies(Package xdtoPackage)
      Creates dependencies of the Package with uri "http://v8.1c.ru/8.1/data/enterprise/current-config"
      Parameters:
      xdtoPackage - Package for filling import section, can't be null