Class ImagesServiceImpl

java.lang.Object
net.anotheria.asg.service.AbstractASGService
All Implemented Interfaces:
net.anotheria.anoprise.metafactory.Service, IImagesService, net.anotheria.asg.service.ASGService, net.anotheria.asg.util.listener.IModuleListener

public class ImagesServiceImpl extends BasicCMSService implements IImagesService, net.anotheria.asg.util.listener.IModuleListener
  • Method Details

    • moduleLoaded

      public void moduleLoaded(net.anotheria.anodoc.data.Module module)
      Specified by:
      moduleLoaded in interface net.anotheria.asg.util.listener.IModuleListener
    • getImages

      public List<Image> getImages()
      Description copied from interface: IImagesService
      Returns all Images objects stored.
      Specified by:
      getImages in interface IImagesService
    • getImages

      public List<Image> getImages(net.anotheria.util.sorter.SortType sortType)
      Description copied from interface: IImagesService
      Returns all Images objects sorted by given sortType.
      Specified by:
      getImages in interface IImagesService
    • getImages

      public List<Image> getImages(List<String> ids)
      Returns the Image objects with the specified ids.
    • getImages

      public List<Image> getImages(List<String> ids, net.anotheria.util.sorter.SortType sortType)
      Returns the Image objects with the specified ids, sorted by given sorttype.
    • deleteImage

      public void deleteImage(Image image)
      Description copied from interface: IImagesService
      Deletes a Image object.
      Specified by:
      deleteImage in interface IImagesService
    • deleteImage

      public void deleteImage(String id)
      Description copied from interface: IImagesService
      Deletes a Image object by id.
      Specified by:
      deleteImage in interface IImagesService
    • deleteImages

      public void deleteImages(List<Image> list)
      Description copied from interface: IImagesService
      Deletes multiple Image object.
      Specified by:
      deleteImages in interface IImagesService
    • getImage

      public Image getImage(String id)
      Description copied from interface: IImagesService
      Returns the Image object with the specified id.
      Specified by:
      getImage in interface IImagesService
    • importImage

      public Image importImage(Image image)
      Description copied from interface: IImagesService
      Imports a new Image object. Returns the created version.
      Specified by:
      importImage in interface IImagesService
    • importImages

      public List<Image> importImages(List<Image> list)
      Description copied from interface: IImagesService
      Imports multiple new Image object. Returns the created versions.
      Specified by:
      importImages in interface IImagesService
    • createImage

      public Image createImage(Image image)
      Description copied from interface: IImagesService
      Creates a new Image object. Returns the created version.
      Specified by:
      createImage in interface IImagesService
    • createImages

      public List<Image> createImages(List<Image> list)
      Description copied from interface: IImagesService
      Creates multiple new Image objects. Returns the created versions.
      Specified by:
      createImages in interface IImagesService
    • updateImage

      public Image updateImage(Image image)
      Description copied from interface: IImagesService
      Updates a Image object. Returns the updated version.
      Specified by:
      updateImage in interface IImagesService
    • updateImages

      public List<Image> updateImages(List<Image> list)
      Description copied from interface: IImagesService
      Updates multiple Image objects. Returns the updated versions.
      Specified by:
      updateImages in interface IImagesService
    • getImagesByProperty

      public List<Image> getImagesByProperty(String propertyName, Object value)
      Description copied from interface: IImagesService
      Returns all Image objects, where property with given name equals object.
      Specified by:
      getImagesByProperty in interface IImagesService
    • getImagesByProperty

      public List<Image> getImagesByProperty(String propertyName, Object value, net.anotheria.util.sorter.SortType sortType)
      Description copied from interface: IImagesService
      Returns all Image objects, where property with given name equals object, sorted.
      Specified by:
      getImagesByProperty in interface IImagesService
    • executeQueryOnImages

      public net.anotheria.anodoc.query2.QueryResult executeQueryOnImages(net.anotheria.anodoc.query2.DocumentQuery query)
      Executes a query on Images
      Specified by:
      executeQueryOnImages in interface IImagesService
    • getImagesByProperty

      public List<Image> getImagesByProperty(net.anotheria.anodoc.query2.QueryProperty... property)
      Returns all Image objects, where property matches.
      Specified by:
      getImagesByProperty in interface IImagesService
    • getImagesByProperty

      public List<Image> getImagesByProperty(net.anotheria.util.sorter.SortType sortType, net.anotheria.anodoc.query2.QueryProperty... property)
      Returns all Image objects, where property matches, sorted
      Specified by:
      getImagesByProperty in interface IImagesService
    • getImagesCount

      public int getImagesCount()
      Returns Image objects count.
      Specified by:
      getImagesCount in interface IImagesService
    • getImages

      public List<Image> getImages(net.anotheria.util.slicer.Segment aSegment)
      Returns Image objects segment.
      Specified by:
      getImages in interface IImagesService
    • getImagesByProperty

      public List<Image> getImagesByProperty(net.anotheria.util.slicer.Segment aSegment, net.anotheria.anodoc.query2.QueryProperty... property)
      Returns Image objects segment, where property matched.
      Specified by:
      getImagesByProperty in interface IImagesService
    • getImagesByProperty

      public List<Image> getImagesByProperty(net.anotheria.util.slicer.Segment aSegment, net.anotheria.util.sorter.SortType aSortType, net.anotheria.anodoc.query2.QueryProperty... aProperty)
      Returns Image objects segment, where property matched, sorted.
      Specified by:
      getImagesByProperty in interface IImagesService
    • fetchImage

      public void fetchImage(String id, Set<String> addedDocuments, org.codehaus.jettison.json.JSONArray data) throws ImagesServiceException
      Description copied from interface: IImagesService
      Create json object list dependencies for this Image document.
      Specified by:
      fetchImage in interface IImagesService
      Throws:
      ImagesServiceException
    • copyMultilingualAttributesInAllImages

      public void copyMultilingualAttributesInAllImages(String sourceLanguage, String targetLanguage)
      Description copied from interface: IImagesService
      In all documents of type Image copies all multilingual fields from sourceLanguage to targetLanguage.
      Specified by:
      copyMultilingualAttributesInAllImages in interface IImagesService
    • executeParsingForDocument

      public void executeParsingForDocument(DocumentName documentName, org.codehaus.jettison.json.JSONObject data) throws ImagesServiceException
      Description copied from interface: IImagesService
      Save transferred document by its own type.
      Specified by:
      executeParsingForDocument in interface IImagesService
      Throws:
      ImagesServiceException
    • copyMultilingualAttributesInAllObjects

      public void copyMultilingualAttributesInAllObjects(String sourceLanguage, String targetLanguage)
      Copies all multilingual fields from sourceLanguage to targetLanguage in all data objects (documents, vo) which are part of this module and managed by this service
      Specified by:
      copyMultilingualAttributesInAllObjects in interface IImagesService
    • executeQueryOnAllObjects

      public net.anotheria.anodoc.query2.QueryResult executeQueryOnAllObjects(net.anotheria.anodoc.query2.DocumentQuery query)
      Executes a query on all data objects (documents, vo) which are part of this module and managed by this service
      Specified by:
      executeQueryOnAllObjects in interface IImagesService
    • exportImagesToXML

      public net.anotheria.util.xml.XMLNode exportImagesToXML()
    • exportImagesToXML

      public net.anotheria.util.xml.XMLNode exportImagesToXML(List<Image> list)
      Description copied from interface: IImagesService
      Creates an xml element with selected contained data.
      Specified by:
      exportImagesToXML in interface IImagesService
    • exportImagesToXML

      public net.anotheria.util.xml.XMLNode exportImagesToXML(String[] languages)
    • exportImagesToXML

      public net.anotheria.util.xml.XMLNode exportImagesToXML(String[] languages, List<Image> list)
      Description copied from interface: IImagesService
      creates an xml element with selected contained data but only selected languages in multilingual attributes
      Specified by:
      exportImagesToXML in interface IImagesService
    • exportToXML

      public net.anotheria.util.xml.XMLNode exportToXML()
      Description copied from interface: IImagesService
      creates an xml element with all contained data.
      Specified by:
      exportToXML in interface IImagesService
    • exportToXML

      public net.anotheria.util.xml.XMLNode exportToXML(String[] languages)
      Description copied from interface: IImagesService
      creates an xml element with all contained data but only selected languages in multilingual attributes.
      Specified by:
      exportToXML in interface IImagesService