Class Core

java.lang.Object
org.adempiere.base.Core

public class Core extends Object
This is a facade class for the Service Locator. It provides simple access to all core services.
Author:
viola, hengsin
  • Field Details

    • SCRIPT_ENGINE_FACTORY_CACHE_TABLE_NAME

      public static final String SCRIPT_ENGINE_FACTORY_CACHE_TABLE_NAME
      See Also:
    • IPROCESS_FACTORY_CACHE_TABLE_NAME

      public static final String IPROCESS_FACTORY_CACHE_TABLE_NAME
      See Also:
    • IRESOURCE_FINDER_CACHE_TABLE_NAME

      public static final String IRESOURCE_FINDER_CACHE_TABLE_NAME
      See Also:
    • IDEPRECIATION_METHOD_FACTORY_CACHE_TABLE_NAME

      public static final String IDEPRECIATION_METHOD_FACTORY_CACHE_TABLE_NAME
      See Also:
    • IPAYMENT_EXPORTER_FACTORY_CACHE_TABLE_NAME

      public static final String IPAYMENT_EXPORTER_FACTORY_CACHE_TABLE_NAME
      See Also:
    • IREPLENISH_FACTORY_CACHE_TABLE_NAME

      public static final String IREPLENISH_FACTORY_CACHE_TABLE_NAME
      See Also:
    • ITAX_PROVIDER_FACTORY_CACHE_TABLE_NAME

      public static final String ITAX_PROVIDER_FACTORY_CACHE_TABLE_NAME
      See Also:
    • IADDRESS_VALIDATION_FACTORY_CACHE_TABLE_NAME

      public static final String IADDRESS_VALIDATION_FACTORY_CACHE_TABLE_NAME
      See Also:
    • IBANK_STATEMENT_MATCHER_FACTORY_CACHE_TABLE_NAME

      public static final String IBANK_STATEMENT_MATCHER_FACTORY_CACHE_TABLE_NAME
      See Also:
    • IBANK_STATEMENT_LOADER_FACTORY_CACHE_TABLE_NAME

      public static final String IBANK_STATEMENT_LOADER_FACTORY_CACHE_TABLE_NAME
      See Also:
    • IMODEL_VALIDATOR_FACTORY_CACHE_TABLE_NAME

      public static final String IMODEL_VALIDATOR_FACTORY_CACHE_TABLE_NAME
      See Also:
    • ISHIPMENT_PROCESSOR_FACTORY_CACHE_TABLE_NAME

      public static final String ISHIPMENT_PROCESSOR_FACTORY_CACHE_TABLE_NAME
      See Also:
    • IPAYMENT_PROCESSOR_FACTORY_CACHE_TABLE_NAME

      public static final String IPAYMENT_PROCESSOR_FACTORY_CACHE_TABLE_NAME
      See Also:
  • Constructor Details

    • Core

      public Core()
  • Method Details

    • getResourceFinder

      public static IResourceFinder getResourceFinder()
      Returns:
      list of active resource finder
    • findCallout

      public static List<IColumnCallout> findCallout(String tableName, String columnName)
      Parameters:
      tableName -
      columnName -
      Returns:
      list of callout register for tableName.columnName
    • getCallout

      public static Callout getCallout(String className, String methodName)
      Parameters:
      className -
      methodName -
      Returns:
      callout for className
    • getProcess

      public static ProcessCall getProcess(String processId)
      Parameters:
      processId - Java class name or equinox extension id
      Returns:
      ProcessCall instance or null if processId not found
    • getModelValidator

      public static ModelValidator getModelValidator(String validatorId)
      Parameters:
      validatorId - Java class name or equinox extension Id
      Returns:
      ModelValidator instance of null if validatorId not found
    • getPasswordResetService

      public static IPasswordResetService getPasswordResetService()
      Get the password reset service for the current tenant. Delegates to PasswordResetServiceFactory, which honors the PASSWORD_RESET_SERVICE_CLASS config and falls back to the default provider.
      Returns:
      IPasswordResetService, or null if none is registered
    • getKeyStore

      public static IKeyStore getKeyStore()
      Returns:
      IKeyStore
    • getPaymentProcessor

      public static PaymentProcessor getPaymentProcessor(MBankAccountProcessor mbap, PaymentInterface mp)
      Get payment processor instance
      Parameters:
      mbap - payment processor model
      mp - payment model
      Returns:
      initialized PaymentProcessor or null
    • getBankStatementLoader

      public static BankStatementLoaderInterface getBankStatementLoader(String className)
      get BankStatementLoader instance
      Parameters:
      className -
      Returns:
      instance of the BankStatementLoaderInterface or null
    • getBankStatementMatcher

      public static BankStatementMatcherInterface getBankStatementMatcher(String className)
      get BankStatementMatcher instance
      Parameters:
      className -
      Returns:
      instance of the BankStatementMatcherInterface or null
    • getShipmentProcessor

      public static IShipmentProcessor getShipmentProcessor(MShipperFacade sf)
      Parameters:
      sf -
      Returns:
      shipment process instance or null if not found
    • getAddressValidation

      public static IAddressValidation getAddressValidation(MAddressValidation validation)
      Get address validation instance
      Parameters:
      validation -
      Returns:
      address validation instance or null if not found
    • getTaxProvider

      public static ITaxProvider getTaxProvider(MTaxProvider provider)
      Get tax provider instance
      Parameters:
      provider -
      Returns:
      tax provider instance or null if not found
    • getReplenish

      public static ReplenishInterface getReplenish(String className)
      get Custom Replenish instance
      Parameters:
      className -
      Returns:
      instance of the ReplenishInterface or null
    • getScriptEngine

      public static ScriptEngine getScriptEngine(String engineName)
      Get script engine
      Parameters:
      engineName -
      Returns:
      ScriptEngine found, or null
    • getPaymentExporter

      public static PaymentExport getPaymentExporter(String className)
      get PaymentExporter instance
      Parameters:
      className -
      Returns:
      instance of the PaymentExporterInterface or null
    • getProductPricing

      public static IProductPricing getProductPricing()
      get ProductPricing instance
      Returns:
      instance of the IProductPricing or null
    • getDepreciationMethod

      public static IDepreciationMethod getDepreciationMethod(DepreciationFactoryLookupDTO factoryLookupDTO)
      lookup implement IDepreciationMethod
      Parameters:
      factoryLookupDTO -
      Returns:
      IDepreciationMethod
    • getMessageService

      public static IMessageService getMessageService()
      Returns:
      IMessageService
    • getClusterService

      public static IClusterService getClusterService()
      Returns:
      IClusterService
    • getCacheService

      public static ICacheService getCacheService()
      Returns:
      ICacheService
    • getDictionaryService

      public static IDictionaryService getDictionaryService()
      Returns:
      IDictionaryService
    • getMappedModelFactory

      public static IMappedModelFactory getMappedModelFactory()
      Returns:
      IMappedModelFactory
    • getMappedProcessFactory

      public static IMappedProcessFactory getMappedProcessFactory()
      Returns:
      IMappedProcessFactory
    • getMappedColumnCalloutFactory

      public static IMappedColumnCalloutFactory getMappedColumnCalloutFactory()
      Returns:
      IMappedColumnCalloutFactory
    • getMappedDocumentFactory

      public static IMappedDocumentFactory getMappedDocumentFactory()
      Returns:
      IMappedDocumentFactory
    • getEventManager

      public static IEventManager getEventManager()
      Returns:
      IEventManager
    • getUploadServices

      public static List<IUploadService> getUploadServices()
      Returns:
      IUploadService
    • getUploadService

      public static IUploadService getUploadService(MAuthorizationAccount account)
      Parameters:
      account -
      Returns:
      IUploadService
    • getPrintHeaderFooter

      public static IPrintHeaderFooter getPrintHeaderFooter(I_AD_PrintHeaderFooter printHeaderFooter)
      Get print header/footer instance
      Parameters:
      printHeaderFooter - print header/footer
      Returns:
      print header/footer instance or null if not found
    • getReservationTracerFactory

      public static IReservationTracerFactory getReservationTracerFactory()
      Returns:
      IReservationTracerFactory implementation
    • getTaxLookup

      public static ITaxLookup getTaxLookup()
      Get tax lookup service
      Returns:
      ITaxLookup service
    • getDefaultAnnotationBasedEventManager

      public static DefaultAnnotationBasedEventManager getDefaultAnnotationBasedEventManager()
      Returns:
      DefaultAnnotationBasedEventManager
    • getCreditManager

      public static ICreditManager getCreditManager(PO po)
      get Credit Manager
      Parameters:
      po -
      Returns:
      instance of the ICreditManager
    • getReportRenderer

      public static IReportRenderer<IReportRendererConfiguration> getReportRenderer(String id)
    • getReportContentRenderer

      public static IReportContentRenderer getReportContentRenderer(ReportContentRequest request)
      Gets a cached report content renderer using the first applicable factory in OSGi service ranking order, or the standard report engine as fallback. Post-processing is controlled by the report content request.
      Parameters:
      request - report content request
      Returns:
      renderer or null
    • getReportContent

      public static File getReportContent(ReportContentRequest request, String contentType, String fileExtension)
      Creates report content through the highest-ranking applicable service and falls back to the standard ReportEngine.
      Parameters:
      request - report content request
      contentType - requested MIME type
      fileExtension - requested file extension
      Returns:
      generated content or null
    • getReportContent

      public static File getReportContent(ReportContentRequest request, String contentType, String fileExtension, File outputFile)
      Creates report content through the highest-ranking applicable service and copies it to outputFile when supplied.
      Parameters:
      request - report content request
      contentType - requested MIME type
      fileExtension - requested file extension
      outputFile - optional target file
      Returns:
      generated content or null
    • processReportContent

      public static File processReportContent(ReportContentRequest request, String contentType, String fileExtension, File content)
      Applies all applicable report content processors in descending OSGi service ranking order.
      Parameters:
      request - report content request
      contentType - requested MIME type
      fileExtension - requested file extension
      content - generated content
      Returns:
      processed content, or null when content is null
    • getCompiledScript

      public static CompiledScript getCompiledScript(MRule rule)
      Get a compiled script for the given rule. Uses JSR-223 Compilable interface for caching pre-compiled scripts. This significantly improves performance for repeatedly executed scripts (e.g., table validators, callouts) by avoiding re-parsing and re-compilation.
      Parameters:
      rule - MRule containing the script
      Returns:
      CompiledScript if engine supports compilation, null otherwise
    • getSearchProviders

      public static List<ISearchProvider> getSearchProviders()
      Returns:
      list of search providers
    • getMarkdownRenderer

      public static IMarkdownRenderer getMarkdownRenderer()