Class DefaultAtlasContext

  • All Implemented Interfaces:
    io.atlasmap.api.AtlasContext, io.atlasmap.mxbean.AtlasContextMXBean

    public class DefaultAtlasContext
    extends Object
    implements io.atlasmap.api.AtlasContext, io.atlasmap.mxbean.AtlasContextMXBean
    • Constructor Detail

      • DefaultAtlasContext

        public DefaultAtlasContext​(URI atlasMappingUri)
      • DefaultAtlasContext

        public DefaultAtlasContext​(DefaultAtlasContextFactory factory,
                                   io.atlasmap.api.AtlasContextFactory.Format format,
                                   InputStream stream)
                            throws io.atlasmap.api.AtlasException
        Throws:
        io.atlasmap.api.AtlasException
    • Method Detail

      • init

        protected void init()
                     throws io.atlasmap.api.AtlasException
        TODO: For dynamic re-load. This needs lock()
        Throws:
        io.atlasmap.api.AtlasException - failed to initialize
      • processPreview

        @Deprecated
        public io.atlasmap.v2.Audits processPreview​(io.atlasmap.v2.Mapping mapping)
                                             throws io.atlasmap.api.AtlasException
        Deprecated.
        Use AtlasPreviewContext#processPreview(Mapping)
        Process single mapping entry in preview mode. Since modules don't participate in preview mode, any document format specific function won't be applied.
        Specified by:
        processPreview in interface io.atlasmap.api.AtlasContext
        Parameters:
        mapping - A @link{Mapping} entry to process
        Throws:
        io.atlasmap.api.AtlasException
      • applyFieldActions

        protected io.atlasmap.v2.Field applyFieldActions​(DefaultAtlasSession session,
                                                         io.atlasmap.v2.Field field)
      • process

        public void process​(io.atlasmap.api.AtlasSession userSession)
                     throws io.atlasmap.api.AtlasException
        Process session lifecycle.
        Specified by:
        process in interface io.atlasmap.api.AtlasContext
        Throws:
        io.atlasmap.api.AtlasException
      • processSourceFieldMapping

        protected void processSourceFieldMapping​(DefaultAtlasSession session)
      • resolveModule

        protected io.atlasmap.spi.AtlasModule resolveModule​(io.atlasmap.spi.FieldDirection direction,
                                                            io.atlasmap.v2.Field field)
      • processCombineField

        protected io.atlasmap.v2.Field processCombineField​(DefaultAtlasSession session,
                                                           io.atlasmap.v2.Mapping mapping,
                                                           List<io.atlasmap.v2.Field> sourceFields,
                                                           io.atlasmap.v2.Field targetField)
      • processSeparateField

        protected List<io.atlasmap.v2.Field> processSeparateField​(DefaultAtlasSession session,
                                                                  io.atlasmap.v2.Mapping mapping,
                                                                  io.atlasmap.v2.Field sourceField)
                                                           throws io.atlasmap.api.AtlasException
        Throws:
        io.atlasmap.api.AtlasException
      • processValidation

        public void processValidation​(io.atlasmap.api.AtlasSession userSession)
                               throws io.atlasmap.api.AtlasException
        Specified by:
        processValidation in interface io.atlasmap.api.AtlasContext
        Throws:
        io.atlasmap.api.AtlasException
      • getContextFactory

        public DefaultAtlasContextFactory getContextFactory()
        Specified by:
        getContextFactory in interface io.atlasmap.api.AtlasContext
      • getMapping

        public io.atlasmap.v2.AtlasMapping getMapping()
      • createSession

        public io.atlasmap.api.AtlasSession createSession()
                                                   throws io.atlasmap.api.AtlasException
        Specified by:
        createSession in interface io.atlasmap.api.AtlasContext
        Throws:
        io.atlasmap.api.AtlasException
      • createSession

        public io.atlasmap.api.AtlasSession createSession​(io.atlasmap.v2.AtlasMapping mappingDefinition)
                                                   throws io.atlasmap.api.AtlasException
        Throws:
        io.atlasmap.api.AtlasException
      • setDefaultSessionProperties

        protected void setDefaultSessionProperties​(io.atlasmap.api.AtlasSession session)
      • getSourceModules

        public Map<String,​io.atlasmap.spi.AtlasModule> getSourceModules()
      • setSourceModules

        public void setSourceModules​(Map<String,​io.atlasmap.spi.AtlasModule> sourceModules)
      • getTargetModules

        public Map<String,​io.atlasmap.spi.AtlasModule> getTargetModules()
      • setTargetModules

        public void setTargetModules​(Map<String,​io.atlasmap.spi.AtlasModule> targetModules)
      • getLookupTables

        public Map<String,​io.atlasmap.v2.LookupTable> getLookupTables()
      • setLookupTables

        public void setLookupTables​(Map<String,​io.atlasmap.v2.LookupTable> lookupTables)
      • setJmxObjectName

        protected void setJmxObjectName​(ObjectName jmxObjectName)
      • getJmxObjectName

        public ObjectName getJmxObjectName()
      • getUuid

        public String getUuid()
        Specified by:
        getUuid in interface io.atlasmap.mxbean.AtlasContextMXBean
      • getVersion

        public String getVersion()
        Specified by:
        getVersion in interface io.atlasmap.mxbean.AtlasContextMXBean
      • getMappingName

        public String getMappingName()
        Specified by:
        getMappingName in interface io.atlasmap.mxbean.AtlasContextMXBean
      • setMappingUri

        protected void setMappingUri​(URI atlasMappingUri)
      • getMappingUri

        public String getMappingUri()
        Specified by:
        getMappingUri in interface io.atlasmap.mxbean.AtlasContextMXBean
      • getClassName

        public String getClassName()
        Specified by:
        getClassName in interface io.atlasmap.mxbean.AtlasContextMXBean
      • getThreadName

        public String getThreadName()
        Specified by:
        getThreadName in interface io.atlasmap.mxbean.AtlasContextMXBean