Skip to content

Commit

Permalink
Added getPublishInvestigations to interface. Refs #9223.
Browse files Browse the repository at this point in the history
  • Loading branch information
jawrainey committed Apr 1, 2014
1 parent e586877 commit 4b643b1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/ICatalogInfoService.h
Expand Up @@ -45,6 +45,8 @@ namespace Mantid
virtual const std::string getDownloadURL(const long long&)=0;
/// Obtain the url to upload a file to.
virtual const std::string getUploadURL(const std::string&,const std::string&,const std::string&)=0;
/// Obtains the investigations that the user can publish to and saves related information to a workspace..
virtual ITableWorkspace_sptr getPublishInvestigations()=0;
};

typedef boost::shared_ptr<ICatalogInfoService> ICatalogInfoService_sptr;
Expand Down
Expand Up @@ -71,6 +71,8 @@ namespace Mantid
const std::string &investigationID, const std::string &createFileName, const std::string &dataFileDescription);
/// keep alive
virtual void keepAlive();
/// Obtains the investigations that the user can publish to and saves related information to a workspace.
virtual API::ITableWorkspace_sptr getPublishInvestigations();

private:
/// The helper class that accesses ICAT functionality.
Expand Down
Expand Up @@ -66,6 +66,8 @@ namespace Mantid
/// get URL of where to PUT (publish) files.
virtual const std::string getUploadURL(
const std::string &investigationID, const std::string &createFileName, const std::string &dataFileDescription);
/// Obtains the investigations that the user can publish to and saves related information to a workspace.
virtual API::ITableWorkspace_sptr getPublishInvestigations();
/// Keep current session alive
virtual void keepAlive();

Expand Down
10 changes: 10 additions & 0 deletions Code/Mantid/Framework/ICat/src/ICat3/ICat3Catalog.cpp
Expand Up @@ -143,5 +143,15 @@ namespace Mantid
{
}

/**
* Obtains the investigations that the user can publish
* to and saves related information to a workspace.
* @return A workspace containing investigation information the user can publish to.
*/
API::ITableWorkspace_sptr ICat3Catalog::getPublishInvestigations()
{
throw std::runtime_error("Publishing is not supported in ICat3Catalog.");
}

}
}
8 changes: 8 additions & 0 deletions Code/Mantid/Framework/ICat/src/ICat4/ICat4Catalog.cpp
Expand Up @@ -777,6 +777,14 @@ namespace Mantid
return url;
}

/**
* Obtains the investigations that the user can publish
* to and saves related information to a workspace.
* @return A workspace containing investigation information the user can publish to.
*/
API::ITableWorkspace_sptr ICat4Catalog::getPublishInvestigations()
{
}

/**
* Search the archive & obtain the dataset ID for a specific investigation.
Expand Down

0 comments on commit 4b643b1

Please sign in to comment.