Package com.cognifide.slice.mapper.api

Examples of com.cognifide.slice.mapper.api.Mapper


  public CQMapperFactory(final SlingMapperFactory slingMapperFactory) {
    this.slingMapperFactory = slingMapperFactory;
  }

  public Mapper getMapper() {
    final Mapper mapper = slingMapperFactory.getMapper();
    mapper.registerFieldProcessor(new ImageFieldProcessor());
    return mapper;
  }
View Full Code Here


    this.sliceResourceFieldProcessor = sliceResourceFieldProcessor;
    this.sliceReferenceFieldProcessor = sliceReferenceFieldProcessor;
  }

  public Mapper getMapper() {
    final Mapper mapper = mapperFactory.getMapper();

    mapper.registerFieldProcessor(new BooleanFieldProcessor());
    mapper.registerFieldProcessor(sliceResourceFieldProcessor);
    mapper.registerFieldProcessor(sliceReferenceFieldProcessor);
    mapper.registerFieldPostProcessor(new EscapeValuePostProcessor());

    return mapper;
  }
View Full Code Here

    public void afterInjection(Object injectee) {
      Resource resource = currentResourceProvider.get().get();
      if (resource == null) {
        return;
      }
      Mapper mapper = mapperProvider.get();
      mapper.get(resource, injectee);
      if (injectee instanceof InitializableModel) {
        ((InitializableModel) injectee).afterCreated();
      }
    }
View Full Code Here

TOP

Related Classes of com.cognifide.slice.mapper.api.Mapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.