Class ImageAndDocumentService
- java.lang.Object
-
- de.narimo.georepo.server.api.documents.ImageAndDocumentService
-
public class ImageAndDocumentService extends Object
-
-
Constructor Summary
Constructors Constructor Description ImageAndDocumentService()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidacceptImageOrDocument(javax.servlet.ServletContext ctx, int layerId, int gfid, String diffDocumentFilename, String workspace, DocumentType documentType)intaddImageOrDocument(javax.servlet.ServletContext ctx, de.narimo.commons.dto.User user, String workspace, InputStream fileInputStream, String filename, int layerId, int gfid, DocumentType documentType, String description)voiddeclineImageOrDocument(javax.servlet.ServletContext ctx, int layerId, int gfid, String diffDocumentFilename, String workspace, DocumentType documentType)byte[]getDiffFeatureImageOrDocument(javax.servlet.ServletContext ctx, String workspace, int layerId, int gfid, String filename, DocumentType documentType)byte[]getFeatureImageOrDocument(javax.servlet.ServletContext ctx, String workspace, int layerId, int gfid, String filename, DocumentType documentType)List<String>getFeatureImages(int layerId, int gfid)Deprecated.List<FeatureDocument>getFeatureImagesOrDocuments(de.narimo.commons.dto.User user, String workspace, int layerId, int gfid, DocumentType documentType)StringgetFileExtension(String filename)List<FeatureDocument>getUnreviewedImagesOrDocuments(de.narimo.commons.dto.User user, String workspace, int layerId, DocumentType documentType)booleanisAllowedFileType(String fileType, DocumentType documentType)Checks a simple file type like png, jpg for being valid.
-
-
-
Method Detail
-
getFeatureImages
@Deprecated public List<String> getFeatureImages(int layerId, int gfid) throws IOException, SQLException
Deprecated.- Throws:
IOExceptionSQLException
-
getFeatureImagesOrDocuments
public List<FeatureDocument> getFeatureImagesOrDocuments(de.narimo.commons.dto.User user, String workspace, int layerId, int gfid, DocumentType documentType) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getFeatureImageOrDocument
public byte[] getFeatureImageOrDocument(javax.servlet.ServletContext ctx, String workspace, int layerId, int gfid, String filename, DocumentType documentType) throws NoSuchFileException, IOException, SQLException
-
getDiffFeatureImageOrDocument
public byte[] getDiffFeatureImageOrDocument(javax.servlet.ServletContext ctx, String workspace, int layerId, int gfid, String filename, DocumentType documentType) throws IOException, NoSuchFileException, SQLException
-
getUnreviewedImagesOrDocuments
public List<FeatureDocument> getUnreviewedImagesOrDocuments(de.narimo.commons.dto.User user, String workspace, int layerId, DocumentType documentType) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
addImageOrDocument
public int addImageOrDocument(javax.servlet.ServletContext ctx, de.narimo.commons.dto.User user, String workspace, InputStream fileInputStream, String filename, int layerId, int gfid, DocumentType documentType, String description) throws IOException, SQLException- Throws:
IOExceptionSQLException
-
acceptImageOrDocument
public void acceptImageOrDocument(javax.servlet.ServletContext ctx, int layerId, int gfid, String diffDocumentFilename, String workspace, DocumentType documentType) throws IOException- Throws:
IOException
-
declineImageOrDocument
public void declineImageOrDocument(javax.servlet.ServletContext ctx, int layerId, int gfid, String diffDocumentFilename, String workspace, DocumentType documentType) throws IOException- Throws:
IOException
-
isAllowedFileType
public boolean isAllowedFileType(String fileType, DocumentType documentType)
Checks a simple file type like png, jpg for being valid.- Returns:
-
-