Class InvokableReporters
java.lang.Object
it.uniroma2.art.semanticturkey.services.STServiceAdapter
it.uniroma2.art.semanticturkey.services.core.InvokableReporters
- All Implemented Interfaces:
NewerNewStyleService
,STService
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static class
-
Field Summary
Fields inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
applicationEventPublisher, cfManager, exptManager, stServiceContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSectionToReporter
(String reference, com.fasterxml.jackson.databind.node.ObjectNode section, int index) Adds a section to the invokable reporter identified by the supplied reference.void
compileAndExportReport
(jakarta.servlet.http.HttpServletResponse response, String reporterReference, String targetMimeType, PluginSpecification deployerSpec) Invokes the referenced reporter and compile a report, which is downloaded as a rendered resource.compileReport
(String reporterReference, boolean render, boolean includeTemplate) Invokes the referenced reporter and compile a report, which is returned as a structured object.void
createInvokableReporter
(String reference, com.fasterxml.jackson.databind.node.ObjectNode definition) Creates an invokable reporter given its definition and a reference telling where its configuration will be stored.void
deleteInvokableReporter
(String reference) Deletes the invokable reporter identified by the supplied reference.Returns the scopes on which invokable reporters can be defined.getInvokableReporter
(String reference) Returns the description of the invokable reporter identified by the supplied reference.Returns a form for the definition of a new invokable reporter.Returns the references to already defined reporters.protected InvokableReporterStore
void
removeSectionFromReporter
(String reference, int index) Removes the section at the provided index inside the invokable reporter identified by the supplied reference.void
updateInvokableReporter
(String reference, com.fasterxml.jackson.databind.node.ObjectNode definition) Updates the invokable reporter identified by the supplied reference.void
updateSectionInReporter
(String reference, com.fasterxml.jackson.databind.node.ObjectNode section, int index) Updates the section at the provided index inside the invokable reporter identified by the supplied reference.Methods inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
addValue, checkNotLocallyDefined, createQueryBuilder, generateIRI, generateNatureSPARQLSelectPart, generateNatureSPARQLWherePart, generateResourceWithCustomConstructor, getCodaLexModeForSearchFromLexicalizationModel, getDeleteGraph, getGraphFromNature, getInitializedCodaCore, getManagedConnection, getMetadataGraph, getOptionalProject, getPlatformTransactionManager, getProject, getRepository, getRoleFromNature, getUserNamedGraphs, getWorkingGraph, instantiateSearchStrategy, instantiateSearchStrategy, parseReference, publishResourceDeleted, publishResourceDeleted, removeReifiedValue, retrieveResources, shutDownCodaCore, updateTriplePredicate
-
Constructor Details
-
InvokableReporters
public InvokableReporters()
-
-
Method Details
-
getInvokableReporterStore
- Throws:
NoSuchConfigurationManager
-
getInvokableReporterForm
@PreAuthorize("@auth.isAuthorized(\'invokableReporter(reporter)\', \'R\')") @STServiceOperation public InvokableReporter getInvokableReporterForm()Returns a form for the definition of a new invokable reporter.- Returns:
- Throws:
NoSuchConfigurationManager
-
getConfigurationScopes
@PreAuthorize("@auth.isAuthorized(\'invokableReporter(reporter)\', \'R\')") @STServiceOperation public Collection<Scope> getConfigurationScopes() throws NoSuchConfigurationManagerReturns the scopes on which invokable reporters can be defined.- Returns:
- Throws:
NoSuchConfigurationManager
-
getInvokableReporterIdentifiers
@PreAuthorize("@auth.isAuthorized(\'invokableReporter(reporter)\', \'R\')") @STServiceOperation public Collection<Reference> getInvokableReporterIdentifiers() throws NoSuchConfigurationManagerReturns the references to already defined reporters.- Returns:
- Throws:
NoSuchConfigurationManager
-
getInvokableReporter
@PreAuthorize("@auth.isAuthorized(\'invokableReporter(reporter)\', \'R\')") @STServiceOperation public InvokableReporter getInvokableReporter(String reference) throws NoSuchConfigurationManager, STPropertyAccessException Returns the description of the invokable reporter identified by the supplied reference.- Parameters:
reference
-- Returns:
- Throws:
NoSuchConfigurationManager
STPropertyAccessException
WrongPropertiesException
ConfigurationNotFoundException
IOException
-
deleteInvokableReporter
@PreAuthorize("@auth.isAuthorized(\'invokableReporter(reporter)\', \'D\')") @STServiceOperation(method=POST) public void deleteInvokableReporter(String reference) throws ConfigurationNotFoundException, NoSuchConfigurationManager Deletes the invokable reporter identified by the supplied reference.- Parameters:
reference
-- Throws:
ConfigurationNotFoundException
NoSuchConfigurationManager
-
createInvokableReporter
@PreAuthorize("@auth.isAuthorized(\'invokableReporter(reporter)\', \'C\')") @STServiceOperation(method=POST) public void createInvokableReporter(String reference, @JsonSerialized com.fasterxml.jackson.databind.node.ObjectNode definition) throws IOException, WrongPropertiesException, STPropertyUpdateException, NoSuchConfigurationManager Creates an invokable reporter given its definition and a reference telling where its configuration will be stored.- Parameters:
reference
-definition
-- Throws:
IOException
WrongPropertiesException
STPropertyUpdateException
NoSuchConfigurationManager
-
updateInvokableReporter
@PreAuthorize("@auth.isAuthorized(\'invokableReporter(reporter)\', \'U\')") @STServiceOperation(method=POST) public void updateInvokableReporter(String reference, @JsonSerialized com.fasterxml.jackson.databind.node.ObjectNode definition) throws IOException, WrongPropertiesException, STPropertyUpdateException, NoSuchConfigurationManager Updates the invokable reporter identified by the supplied reference.- Parameters:
reference
-definition
-- Throws:
IOException
WrongPropertiesException
STPropertyUpdateException
NoSuchConfigurationManager
-
addSectionToReporter
@PreAuthorize("@auth.isAuthorized(\'invokableReporter(reporter, section)\', \'C\')") @STServiceOperation(method=POST) public void addSectionToReporter(String reference, @JsonSerialized com.fasterxml.jackson.databind.node.ObjectNode section, @Optional(defaultValue="-1") int index) throws NoSuchConfigurationManager, IOException, WrongPropertiesException, STPropertyAccessException, STPropertyUpdateException Adds a section to the invokable reporter identified by the supplied reference. If the insertion index is negative (by default), then the section is appened to the end of the sections list.- Parameters:
reference
-section
-index
-- Throws:
NoSuchConfigurationManager
IOException
WrongPropertiesException
STPropertyAccessException
STPropertyUpdateException
-
updateSectionInReporter
@PreAuthorize("@auth.isAuthorized(\'invokableReporter(reporter, section)\', \'U\')") @STServiceOperation(method=POST) public void updateSectionInReporter(String reference, @JsonSerialized com.fasterxml.jackson.databind.node.ObjectNode section, int index) throws NoSuchConfigurationManager, IOException, WrongPropertiesException, STPropertyAccessException, STPropertyUpdateException Updates the section at the provided index inside the invokable reporter identified by the supplied reference.- Parameters:
reference
-section
-index
-- Throws:
NoSuchConfigurationManager
IOException
WrongPropertiesException
STPropertyAccessException
STPropertyUpdateException
-
removeSectionFromReporter
@PreAuthorize("@auth.isAuthorized(\'invokableReporter(reporter,section)\', \'D\')") @STServiceOperation(method=POST) public void removeSectionFromReporter(String reference, int index) throws NoSuchConfigurationManager, IOException, WrongPropertiesException, STPropertyAccessException, STPropertyUpdateException Removes the section at the provided index inside the invokable reporter identified by the supplied reference.- Parameters:
reference
-index
-- Throws:
NoSuchConfigurationManager
IOException
WrongPropertiesException
STPropertyAccessException
STPropertyUpdateException
-
compileReport
@PreAuthorize("true") @STServiceOperation public InvokableReporters.Report compileReport(String reporterReference, @Optional(defaultValue="true") boolean render, @Optional(defaultValue="true") boolean includeTemplate) throws NoSuchConfigurationManager, IOException, ConfigurationNotFoundException, WrongPropertiesException, STPropertyAccessException, IllegalArgumentException, InvokableReporterException Invokes the referenced reporter and compile a report, which is returned as a structured object. Optionally, it is possible to generate a textual rendering of the report and, indipendently, include the associated templates (e.g. for client-side rendering).- Parameters:
reporterReference
-render
-includeTemplate
-- Returns:
- Throws:
NoSuchConfigurationManager
IOException
ConfigurationNotFoundException
WrongPropertiesException
STPropertyAccessException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
InvokableReporterException
-
compileAndExportReport
@PreAuthorize("true") @STServiceOperation public void compileAndExportReport(jakarta.servlet.http.HttpServletResponse response, String reporterReference, @Optional String targetMimeType, @Optional PluginSpecification deployerSpec) throws NoSuchConfigurationManager, IOException, ConfigurationNotFoundException, WrongPropertiesException, STPropertyAccessException, IllegalArgumentException, InvokableReporterException, InvalidConfigurationException Invokes the referenced reporter and compile a report, which is downloaded as a rendered resource. Optionally, it is possible to convert the report to a different MIME type (e.g.application/pdf
to convert the report into a PDF document).- Parameters:
response
-reporterReference
-targetMimeType
-- Throws:
NoSuchConfigurationManager
IOException
ConfigurationNotFoundException
WrongPropertiesException
STPropertyAccessException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
InvokableReporterException
InvalidConfigurationException
-