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);
}
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);
}
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);
}
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);
}
}
Aggregations