Class TemplateUploadService


  • public class TemplateUploadService
    extends WebService
    A service to enable templates to be uploaded.
    Author:
    Alexis Kalderimis
    • Field Detail

      • TEMPLATES_PARAMETER

        public static final java.lang.String TEMPLATES_PARAMETER
        The key for the templates parameter
        See Also:
        Constant Field Values
      • VERSION_PARAMETER

        public static final java.lang.String VERSION_PARAMETER
        The key for the version parameter
        See Also:
        Constant Field Values
    • Constructor Detail

      • TemplateUploadService

        public TemplateUploadService​(InterMineAPI im)
        Constructor.
        Parameters:
        im - A reference to the API configuration and settings bundle.
    • Method Detail

      • validateState

        protected void validateState()
        Description copied from class: WebService
        Subclasses can put initialisation checks here. The main use case is for confirming authentication.
        Overrides:
        validateState in class WebService
      • canServe

        protected boolean canServe​(Format format)
        Description copied from class: WebService
        Check whether the format is acceptable. By default returns true. Services with a particular set of accepted formats should override this and check.
        Overrides:
        canServe in class WebService
        Parameters:
        format - The format to check.
        Returns:
        whether or not this format is acceptable.
      • execute

        protected void execute()
                        throws java.lang.Exception
        Description copied from class: WebService
        Runs service. This is abstract method, that must be defined in subclasses and so performs something useful. Standard procedure is overwrite this method in subclasses and let this method to be called from WebService.doGet method that encapsulates logic common for all web services else you can overwrite doGet method in your web service class and manage all the things alone.
        Specified by:
        execute in class WebService
        Throws:
        java.lang.Exception - if some error occurs