Search in sources :

Example 1 with RequestBuilder

use of org.opennms.netmgt.provision.support.RequestBuilder in project opennms by OpenNMS.

the class JdbcQueryDetector method sqlQuery.

private static RequestBuilder<JDBCRequest> sqlQuery(final String sqlQuery) {
    return new RequestBuilder<JDBCRequest>() {

        @Override
        public JDBCRequest getRequest() {
            JDBCRequest request = new JDBCRequest();
            request.setSqyQuery(sqlQuery);
            return request;
        }
    };
}
Also used : RequestBuilder(org.opennms.netmgt.provision.support.RequestBuilder) JDBCRequest(org.opennms.netmgt.provision.detector.jdbc.request.JDBCRequest)

Example 2 with RequestBuilder

use of org.opennms.netmgt.provision.support.RequestBuilder in project opennms by OpenNMS.

the class JdbcStoredProcedureDetector method storedProcedure.

private static RequestBuilder<JDBCRequest> storedProcedure(final String storedProcedure) {
    return new RequestBuilder<JDBCRequest>() {

        @Override
        public JDBCRequest getRequest() {
            JDBCRequest request = new JDBCRequest();
            request.setStoredProcedure(storedProcedure);
            return request;
        }
    };
}
Also used : RequestBuilder(org.opennms.netmgt.provision.support.RequestBuilder) JDBCRequest(org.opennms.netmgt.provision.detector.jdbc.request.JDBCRequest)

Example 3 with RequestBuilder

use of org.opennms.netmgt.provision.support.RequestBuilder in project opennms by OpenNMS.

the class RadiusAuthDetector method request.

private static RequestBuilder<AttributeList> request(final String nasID, final String user, final String password) {
    LOG.debug("request: nasID = {}, user = {}, password = {}", nasID, user, password);
    return new RequestBuilder<AttributeList>() {

        @Override
        public AttributeList getRequest() {
            final AttributeList attributes = new AttributeList();
            attributes.add(new Attr_UserName(user));
            attributes.add(new Attr_NASIdentifier(nasID));
            attributes.add(new Attr_UserPassword(password));
            return attributes;
        }
    };
}
Also used : RequestBuilder(org.opennms.netmgt.provision.support.RequestBuilder) AttributeList(net.jradius.packet.attribute.AttributeList) Attr_UserName(net.jradius.dictionary.Attr_UserName) Attr_UserPassword(net.jradius.dictionary.Attr_UserPassword) Attr_NASIdentifier(net.jradius.dictionary.Attr_NASIdentifier)

Aggregations

RequestBuilder (org.opennms.netmgt.provision.support.RequestBuilder)3 JDBCRequest (org.opennms.netmgt.provision.detector.jdbc.request.JDBCRequest)2 Attr_NASIdentifier (net.jradius.dictionary.Attr_NASIdentifier)1 Attr_UserName (net.jradius.dictionary.Attr_UserName)1 Attr_UserPassword (net.jradius.dictionary.Attr_UserPassword)1 AttributeList (net.jradius.packet.attribute.AttributeList)1