Skip to content

Commit

Permalink
White noise: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed May 18, 2016
1 parent eb3c896 commit 2bcf74d
Showing 1 changed file with 42 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,36 +113,19 @@
import org.identityconnectors.framework.spi.operations.UpdateOp;

/**
*
* The database table {@link DatabaseTableConnector} is a basic, but easy to use {@link DatabaseTableConnector} for
*
* accounts in a relational database.
* <p>
* It supports create, update, search, and delete operations. It can also be used
*
* for pass-thru authentication, although it assumes the password is in clear text in the database.
* <p>
* This connector
*
* assumes that all account data is stored in a single database table. The delete action is implemented to simply remove
*
* the row from the table.
* <p>
*
*
* This connector assumes that all account data is stored in a single database table. The delete action is implemented
* to simply remove the row from the table.
*
* @author Will Droste
*
* @author Keith Yarbrough
*
* @version $Revision $
*
* @since 1.0
*
*/
@ConnectorClass(displayNameKey = "DBTABLE_CONNECTOR",
configurationClass = DatabaseTableConfiguration.class)

@ConnectorClass(displayNameKey = "DBTABLE_CONNECTOR", configurationClass = DatabaseTableConfiguration.class)
public class DatabaseTableConnector implements
PoolableConnector, CreateOp, SearchOp<FilterWhereBuilder>,
DeleteOp, UpdateOp, SchemaOp, TestOp, AuthenticateOp, SyncOp,
Expand All @@ -155,9 +138,7 @@ public class DatabaseTableConnector implements

/**
* A "hashed password" attribute. If this attribute is "true" then the value supplied for
*
* the password attribute is assumed to be hashed according to the defined password digest
*
* algorithm, and hence is not hashed (again).
*/
private static final String HASHED_PASSWORD_ATTRIBUTE = AttributeUtil.createSpecialName("HASHED_PASSWORD");
Expand Down Expand Up @@ -262,6 +243,10 @@ public void dispose() {

/**
* Creates a row in the database representing an account.
*
* @param oclass
* @param attrs
* @param options
*/
@Override
public Uid create(final ObjectClass oclass, final Set<Attribute> attrs, final OperationOptions options) {
Expand Down Expand Up @@ -413,6 +398,10 @@ private boolean isToBeEmpty(final String columnName, Object value) {

/**
* Deletes a row from the table.
*
* @param oclass
* @param uid
* @param options
*/
@Override
public void delete(final ObjectClass oclass, final Uid uid, final OperationOptions options) {
Expand Down Expand Up @@ -477,10 +466,17 @@ public void delete(final ObjectClass oclass, final Uid uid, final OperationOptio

/**
* Update the database row with the data provided.
*
* @param oclass
* @param attrs
* @param options
*/
@Override
public Uid update(
final ObjectClass oclass, final Uid uid, final Set<Attribute> attrs, final OperationOptions options) {
final ObjectClass oclass,
final Uid uid,
final Set<Attribute> attrs,
final OperationOptions options) {

LOG.info("update account, check the ObjectClass");
final String SQL_TEMPLATE = "UPDATE {0} SET {1} WHERE {2} = ?";
Expand Down Expand Up @@ -578,6 +574,9 @@ public Uid update(

/**
* Creates a Database Table filter translator.
*
* @param oclass
* @param options
*/
@Override
public FilterTranslator<FilterWhereBuilder> createFilterTranslator(
Expand All @@ -593,9 +592,17 @@ public FilterTranslator<FilterWhereBuilder> createFilterTranslator(

/**
* Search for rows.
*
* @param oclass
* @param where
* @param handler
* @param options
*/
@Override
public void executeQuery(final ObjectClass oclass, final FilterWhereBuilder where, final ResultsHandler handler,
public void executeQuery(
final ObjectClass oclass,
final FilterWhereBuilder where,
final ResultsHandler handler,
final OperationOptions options) {

LOG.info("check the ObjectClass and result handler");
Expand Down Expand Up @@ -911,13 +918,19 @@ private void commit() throws SQLException {

/**
* Attempts to authenticate the given username combination.
*
* @param oclass
* @param username
* @param password
* @param options
*/
@Override
public Uid authenticate(
final ObjectClass oclass,
final String username,
final GuardedString password,
final OperationOptions options) {

final String SQL_AUTH_QUERY = "SELECT {0} FROM {1} WHERE ( {0} = ? ) AND ( {2} = ? )";

LOG.info("check the ObjectClass");
Expand Down Expand Up @@ -1006,9 +1019,13 @@ public Uid authenticate(

/**
* Attempts to resolve the given username.
*
* @param oclass
* @param username
* @param options
*/
@Override
public Uid resolveUsername(ObjectClass oclass, String username, OperationOptions options) {
public Uid resolveUsername(final ObjectClass oclass, final String username, final OperationOptions options) {
final String SQL_AUTH_QUERY = "SELECT {0} FROM {1} WHERE ( {0} = ? )";

LOG.info("check the ObjectClass");
Expand Down

0 comments on commit 2bcf74d

Please sign in to comment.