org.gcube.vremanagement.softwarerepository.softwarearchive.operations.impl
Class GCUBEValidator

java.lang.Object
  extended by org.gcube.vremanagement.softwarerepository.softwarearchive.operations.SoftwareArchiveValidator
      extended by org.gcube.vremanagement.softwarerepository.softwarearchive.operations.impl.GCUBEValidator

public class GCUBEValidator
extends SoftwareArchiveValidator

Software Archive validator for gCube's SAs

Author:
Luca Frosini (ISTI-CNR)

Nested Class Summary
static class GCUBEValidator.InvalidTargetException
           
static class GCUBEValidator.PACKAGETYPE
           
 
Constructor Summary
GCUBEValidator()
           
 
Method Summary
 java.lang.String getServiceID()
           
 void setToPending(java.io.File targetDirectory)
          
 void validate(java.lang.String groupID, java.lang.String description, java.lang.String url, java.lang.String[] scopes)
          Validate the Service
 void validateProfile()
          Validate profile part of service profile
 
Methods inherited from class org.gcube.vremanagement.softwarerepository.softwarearchive.operations.SoftwareArchiveValidator
setProfile, setRootDirectory
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GCUBEValidator

public GCUBEValidator()
               throws java.lang.Exception
Throws:
java.lang.Exception - if fails;
Method Detail

validate

public void validate(java.lang.String groupID,
                     java.lang.String description,
                     java.lang.String url,
                     java.lang.String[] scopes)
              throws java.lang.Exception,
                     ProfileException
Validate the Service

Specified by:
validate in class SoftwareArchiveValidator
Parameters:
groupID - service unique ID (service class + name + version)
description - description
url - network location of the SA
scopes - target scopes, i.e. the scopes where the SA will be visible after the approval
Throws:
java.lang.Exception - if validate fails
ProfileException - if profile loading fails

setToPending

public void setToPending(java.io.File targetDirectory)
                  throws java.lang.Exception

Specified by:
setToPending in class SoftwareArchiveValidator
Parameters:
targetDirectory - directory to store the generated artifact
Throws:
java.lang.Exception - if fails

validateProfile

public void validateProfile()
                     throws java.lang.Exception
Validate profile part of service profile

Throws:
java.lang.Exception - if fails

getServiceID

public java.lang.String getServiceID()
Specified by:
getServiceID in class SoftwareArchiveValidator
Returns:
the service ID of the validated service, if any