本文整理了Java中org.identityconnectors.common.logging.Log.ok()
方法的一些代码示例,展示了Log.ok()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log.ok()
方法的具体详情如下:
包路径:org.identityconnectors.common.logging.Log
类名称:Log
方法名:ok
暂无
代码示例来源:origin: org.connid.bundles/org.connid.bundles.csvdir
private ResultSet doQuery(final PreparedStatement stm)
throws SQLException {
LOG.ok("Execute query {0}", stm.toString());
return stm.executeQuery();
}
代码示例来源:origin: org.connid.bundles/org.connid.bundles.csvdir
public void closeConnection()
throws SQLException {
if (this.conn != null) {
LOG.ok("Closing connection ...");
dropTableAndViewIfExists();
this.conn.close();
tables.clear();
}
}
代码示例来源:origin: org.connid.bundles.soap/org.connid.bundles.soap
/**
* Checks if resource is alive.
*
* @see Connector#test()
*/
@Override
public void checkAlive() {
LOG.ok("Connection test");
connection.test();
}
代码示例来源:origin: org.connid.bundles.soap/org.connid.bundles.soap
/**
* Callback method to receive the {@link Configuration}.
*
* @param cfg connector configuration
* @see Connector#init
*/
@Override
public void init(final Configuration cfg) {
LOG.ok("Connector initialization");
this.config = (WebServiceConfiguration) cfg;
this.connection = new WebServiceConnection(this.config);
}
代码示例来源:origin: Evolveum/midpoint
private <T extends DummyObject> Collection<T> sortObjects(Collection<T> allObjects, OperationOptions options) {
if (options == null) {
return allObjects;
}
SortKey[] sortKeys = options.getSortKeys();
if (sortKeys == null || sortKeys.length == 0) {
return allObjects;
}
List<T> list = new ArrayList<>(allObjects);
list.sort((o1,o2) -> compare(o1, o2, sortKeys));
log.ok("Objects sorted by {0}: {1}", Arrays.toString(sortKeys), list);
return list;
}
代码示例来源:origin: org.connid.bundles.db/common
/**
* Indirect call of prepareCall statement with mapped callable statement parameters
* @param sql a <CODE>String</CODE> sql statement definition
* @param params the bind parameter values
* @return return a callable statement
* @throws SQLException an exception in statement
*/
public CallableStatement prepareCall(final String sql, final List<SQLParam> params) throws SQLException {
log.ok("normalize call statement {0}", sql);
final List<SQLParam> out = new ArrayList<SQLParam>();
final String nomalized = SQLUtil.normalizeNullValues(sql, params, out);
final CallableStatement prepareCall = getConnection().prepareCall(nomalized);
SQLUtil.setParams(prepareCall, out);
log.ok("call statement {0} normalizead and prepared", nomalized);
return prepareCall;
}
代码示例来源:origin: org.connid.bundles.db/common
/**
* Indirect call of prepare statement with mapped prepare statement parameters
* @param sql a <CODE>String</CODE> sql statement definition
* @param params the bind parameter values
* @return return a prepared statement
* @throws SQLException an exception in statement
*/
public PreparedStatement prepareStatement(final String sql, final List<SQLParam> params) throws SQLException {
log.ok("prepareStatement: statement {0}", sql);
final List<SQLParam> out = new ArrayList<SQLParam>();
final String nomalized = SQLUtil.normalizeNullValues(sql, params, out);
final PreparedStatement prepareStatement = getConnection().prepareStatement(nomalized);
SQLUtil.setParams(prepareStatement, out);
log.ok("prepareStatement: normalizzed statement {0} prepared", nomalized);
return prepareStatement;
}
代码示例来源:origin: net.tirasa.connid/connector-framework-internal
@Override
public ConnectorFacade newInstance(final ConnectorInfo connectorInfo, String config) {
ConnectorFacade facade = CACHE.get(config);
if (null == facade) {
// new ConnectorFacade creation must remain cheap operation
facade = super.newInstance(connectorInfo, config);
ConnectorFacade ret = CACHE.putIfAbsent(facade.getConnectorFacadeKey(), facade);
if (null != ret) {
LOG.ok("ConnectorFacade found in cache");
facade = ret;
}
}
return facade;
}
代码示例来源:origin: Tirasa/ConnId
/**
* {@inheritDoc}
*/
@Override
public ConnectorFacade newInstance(final APIConfiguration config) {
ConnectorFacade facade = super.newInstance(config);
ConnectorFacade ret = CACHE.putIfAbsent(facade.getConnectorFacadeKey(), facade);
if (null != ret) {
LOG.ok("ConnectorFacade found in cache");
facade = ret;
}
return facade;
}
代码示例来源:origin: Tirasa/ConnId
@Override
public ConnectorFacade newInstance(final ConnectorInfo connectorInfo, String config) {
ConnectorFacade facade = CACHE.get(config);
if (null == facade) {
// new ConnectorFacade creation must remain cheap operation
facade = super.newInstance(connectorInfo, config);
ConnectorFacade ret = CACHE.putIfAbsent(facade.getConnectorFacadeKey(), facade);
if (null != ret) {
LOG.ok("ConnectorFacade found in cache");
facade = ret;
}
}
return facade;
}
代码示例来源:origin: net.tirasa.connid/connector-framework-internal
/**
* {@inheritDoc}
*/
@Override
public ConnectorFacade newInstance(final APIConfiguration config) {
ConnectorFacade facade = super.newInstance(config);
ConnectorFacade ret = CACHE.putIfAbsent(facade.getConnectorFacadeKey(), facade);
if (null != ret) {
LOG.ok("ConnectorFacade found in cache");
facade = ret;
}
return facade;
}
代码示例来源:origin: org.connid.bundles.soap/org.connid.bundles.soap
/**
* Disposes of the {@link WebServiceConnector}'s resources.
*
* @see Connector#dispose()
*/
@Override
public void dispose() {
LOG.ok("Dispose connector resources");
config = null;
if (connection != null) {
connection.dispose();
connection = null;
}
WebServiceConnection.shutdownBus();
}
代码示例来源:origin: org.connid.bundles.db/common
/**
* Indirect call of prepare statement using the query builder object
* @param query DatabaseQueryBuilder query
* @return return a prepared statement
* @throws SQLException an exception in statement
*/
public PreparedStatement prepareStatement(DatabaseQueryBuilder query) throws SQLException {
final String sql = query.getSQL();
log.ok("prepareStatement {0}", sql);
return prepareStatement(sql, query.getParams());
}
代码示例来源:origin: org.connid.bundles/org.connid.bundles.csvdir
private void executeImpl() throws SQLException {
if (!userExists(uid.getUidValue(), conn, conf)) {
throw new ConnectorException("User does not exist");
}
conn.deleteAccount(uid);
LOG.ok("Delete completed");
}
}
代码示例来源:origin: Evolveum/midpoint
@Override
protected void extendSchema(SchemaBuilder builder) {
super.extendSchema(builder);
if (configuration.getSupportRunAs()) {
log.ok("Adding runAs options to schema");
builder.defineOperationOption(OperationOptionInfoBuilder.buildRunWithUser(), UpdateAttributeValuesOp.class);
builder.defineOperationOption(OperationOptionInfoBuilder.buildRunWithPassword(), UpdateAttributeValuesOp.class);
}
}
代码示例来源:origin: Evolveum/midpoint
@Override
protected void extendSchema(SchemaBuilder builder) {
super.extendSchema(builder);
if (configuration.getSupportRunAs()) {
log.ok("Adding runAs options to schema");
builder.defineOperationOption(OperationOptionInfoBuilder.buildRunWithUser(), UpdateDeltaOp.class);
builder.defineOperationOption(OperationOptionInfoBuilder.buildRunWithPassword(), UpdateDeltaOp.class);
}
}
代码示例来源:origin: org.connid.bundles/org.connid.bundles.csvdir
private Uid executeImpl()
throws SQLException {
if (uid == null || StringUtil.isBlank(uid.getUidValue())) {
throw new IllegalArgumentException("No Name attribute provided in the attributes");
}
if (!userExists(uid.getUidValue(), conn, conf)) {
throw new ConnectorException("User doesn't exist");
}
conn.updateAccount(getAttributeMap(conf, attrs, new Name(uid.getUidValue())), uid);
LOG.ok("Creation commited");
return uid;
}
}
代码示例来源:origin: org.connid.bundles/org.connid.bundles.csvdir
private Uid executeImpl()
throws SQLException {
final Name name = AttributeUtil.getNameFromAttributes(attrs);
if (name == null || StringUtil.isBlank(name.getNameValue())) {
throw new IllegalArgumentException(
"No Name attribute provided in the attributes");
}
if (userExists(name.getNameValue(), conn, conf)) {
throw new ConnectorException("User Exists");
}
conn.insertAccount(getAttributeMap(conf, attrs, name));
LOG.ok("Creation commited");
return new Uid(name.getNameValue());
}
}
代码示例来源:origin: org.connid/test-contract
/**
* Unit test for checking if the {@link Configuration} property type is supported
*/
@Test
public void testPropertiesType() {
assertNotNull(_configProperties);
List<String> propertyNames = _configProperties.getPropertyNames();
assertNotNull(propertyNames);
//go through the properties and check the type
for (String propertyName : propertyNames) {
ConfigurationProperty property = _configProperties.getProperty(propertyName);
assertNotNull(property);
String typeName = property.getType().getName();
LOG.ok("Property: ''{0}'' type ''{1}''", property.getName(), typeName);
assertTrue("Type " + typeName + " not allowed in configuration!", FrameworkUtil
.isSupportedConfigurationType(property.getType()));
}
}
}
代码示例来源:origin: org.connid/connid-test-contract
/**
* Unit test for checking if the {@link Configuration} property type is supported
*/
@Test
public void testPropertiesType() {
assertNotNull(_configProperties);
List<String> propertyNames = _configProperties.getPropertyNames();
assertNotNull(propertyNames);
//go through the properties and check the type
for (String propertyName : propertyNames) {
ConfigurationProperty property = _configProperties.getProperty(propertyName);
assertNotNull(property);
String typeName = property.getType().getName();
LOG.ok("Property: ''{0}'' type ''{1}''", property.getName(), typeName);
assertTrue("Type " + typeName + " not allowed in configuration!", FrameworkUtil
.isSupportedConfigurationType(property.getType()));
}
}
}
内容来源于网络,如有侵权,请联系作者删除!