Search in sources :

Example 1 with TemplateActionsConfigurator

use of com.axway.ats.agent.core.configuration.TemplateActionsConfigurator in project ats-framework by Axway.

the class TemplateActionsConfigurationClient method setTemplateActionsFolder.

@PublicAtsApi
public void setTemplateActionsFolder(String templateActionsFolder) throws AgentException {
    Properties taProperties = new Properties();
    taProperties.put(TemplateActionsConfigurator.AGENT__TEMPLATE_ACTIONS_FOLDER_PROPERTY, templateActionsFolder);
    TemplateActionsConfigurator templateActionsConfigurator = new TemplateActionsConfigurator(taProperties);
    pushConfiguration(templateActionsConfigurator);
}
Also used : TemplateActionsConfigurator(com.axway.ats.agent.core.configuration.TemplateActionsConfigurator) Properties(java.util.Properties) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 2 with TemplateActionsConfigurator

use of com.axway.ats.agent.core.configuration.TemplateActionsConfigurator in project ats-framework by Axway.

the class TemplateActionsConfigurationClient method setMatchingFilesByContent.

@PublicAtsApi
public void setMatchingFilesByContent(boolean matchFilesByContent) throws AgentException {
    Properties taProperties = new Properties();
    taProperties.put(TemplateActionsConfigurator.MATCH_FILES_BY_CONTENT, String.valueOf(matchFilesByContent));
    TemplateActionsConfigurator templateActionsConfigurator = new TemplateActionsConfigurator(taProperties);
    pushConfiguration(templateActionsConfigurator);
}
Also used : TemplateActionsConfigurator(com.axway.ats.agent.core.configuration.TemplateActionsConfigurator) Properties(java.util.Properties) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 3 with TemplateActionsConfigurator

use of com.axway.ats.agent.core.configuration.TemplateActionsConfigurator in project ats-framework by Axway.

the class TemplateActionsConfigurationClient method setMatchingFilesBySize.

@PublicAtsApi
public void setMatchingFilesBySize(boolean matchFilesBySize) throws AgentException {
    Properties taProperties = new Properties();
    taProperties.put(TemplateActionsConfigurator.MATCH_FILES_BY_SIZE, String.valueOf(matchFilesBySize));
    TemplateActionsConfigurator templateActionsConfigurator = new TemplateActionsConfigurator(taProperties);
    pushConfiguration(templateActionsConfigurator);
}
Also used : TemplateActionsConfigurator(com.axway.ats.agent.core.configuration.TemplateActionsConfigurator) Properties(java.util.Properties) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 4 with TemplateActionsConfigurator

use of com.axway.ats.agent.core.configuration.TemplateActionsConfigurator in project ats-framework by Axway.

the class AgentWsContextListener method contextInitialized.

/*
     * (non-Javadoc)
     *
     * @see
     * javax.servlet.ServletContextListener#contextInitialized(javax.servlet
     * .ServletContextEvent)
     */
@Override
public void contextInitialized(ServletContextEvent servletEvent) {
    ServletContext servletContext = servletEvent.getServletContext();
    servletContext.log("Servlet context initialized event is received. Starting registering configurators");
    try {
        new ClasspathUtils().logProblematicJars();
    } catch (RuntimeException e) {
        log.warn("Error caught while trying to get all JARs in classpath", e);
    // do not rethrow exception as this will stop deployment on incompliant servers like JBoss
    }
    // create the default web service configurator
    String pathToConfigFile = servletContext.getRealPath("/WEB-INF");
    AgentConfigurator defaultConfigurator = new AgentConfigurator(pathToConfigFile);
    TemplateActionsConfigurator templateActionsConfigurator = new TemplateActionsConfigurator(pathToConfigFile);
    List<Configurator> configurators = new ArrayList<Configurator>();
    configurators.add(defaultConfigurator);
    configurators.add(templateActionsConfigurator);
    log.info("Initializing ATS Agent web service, start component registration");
    try {
        MainComponentLoader.getInstance().initialize(configurators);
    } catch (AgentException ae) {
        throw new RuntimeException("Unable to initialize Agent component loader", ae);
    }
}
Also used : Configurator(com.axway.ats.agent.core.configuration.Configurator) AgentConfigurator(com.axway.ats.agent.core.configuration.AgentConfigurator) TemplateActionsConfigurator(com.axway.ats.agent.core.configuration.TemplateActionsConfigurator) AgentException(com.axway.ats.agent.core.exceptions.AgentException) TemplateActionsConfigurator(com.axway.ats.agent.core.configuration.TemplateActionsConfigurator) ArrayList(java.util.ArrayList) ServletContext(javax.servlet.ServletContext) ClasspathUtils(com.axway.ats.core.utils.ClasspathUtils) AgentConfigurator(com.axway.ats.agent.core.configuration.AgentConfigurator)

Aggregations

TemplateActionsConfigurator (com.axway.ats.agent.core.configuration.TemplateActionsConfigurator)4 PublicAtsApi (com.axway.ats.common.PublicAtsApi)3 Properties (java.util.Properties)3 AgentConfigurator (com.axway.ats.agent.core.configuration.AgentConfigurator)1 Configurator (com.axway.ats.agent.core.configuration.Configurator)1 AgentException (com.axway.ats.agent.core.exceptions.AgentException)1 ClasspathUtils (com.axway.ats.core.utils.ClasspathUtils)1 ArrayList (java.util.ArrayList)1 ServletContext (javax.servlet.ServletContext)1