Author: andrew.plotnikov
Date: 2011-12-22 09:22:44 -0500 (Thu, 22 Dec 2011)
New Revision: 5342
Modified:
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/DAO.java
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/DatabaseService.java
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/ExoDatasource.java
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/ReflectionMapper.java
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/impl/ExoCacheProvider.java
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/impl/TextClobType.java
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/DocumentReader.java
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/HTMLDocumentReader.java
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/TikaDocumentReader.java
core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/ObjectClassAttribute.java
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/Group.java
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/GroupHandler.java
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/MembershipType.java
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/MembershipTypeEventListenerHandler.java
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/MembershipTypeHandler.java
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/OrganizationConfig.java
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/User.java
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserHandler.java
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserProfile.java
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserProfileHandler.java
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/auth/OrganizationAuthenticatorImpl.java
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/impl/mock/DummyOrganizationService.java
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/UserProfileData.java
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/listeners/MembershipListener.java
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/listeners/MembershipTypeListener.java
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/listeners/UserListener.java
core/trunk/exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/LDAPAttributeMapping.java
core/trunk/exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/UserDAOImpl.java
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/DigestPasswordEncrypter.java
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/Identity.java
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/j2ee/DigestAuthenticationJettyLoginModule.java
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/AbstractLoginModule.java
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/DefaultLoginModule.java
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/IdentitySetLoginModule.java
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/SharedStateLoginModule.java
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/web/SetCurrentIdentityFilter.java
Log:
EXOJCR-1687: Fixed new sonar violations in project
Modified:
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/DAO.java
===================================================================
---
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/DAO.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/DAO.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -44,7 +44,6 @@
protected DBObjectMapper<T> mapper_;
- // TODO need remove
static int totalQueryTime = 0;
static int totalBathTime = 0;
Modified:
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/DatabaseService.java
===================================================================
---
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/DatabaseService.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/DatabaseService.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -48,13 +48,10 @@
*/
public ExoDatasource getDatasource(String dsname) throws Exception;
- // TODO: This method should be removed and used the getDataSource method
public Connection getConnection() throws Exception;
- // TODO: This method should be removed and used the getDataSource method
public Connection getConnection(String dsName) throws Exception;
- // TODO: This method should be removed and used the getDataSource method
public void closeConnection(Connection conn) throws Exception;
/**
Modified:
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/ExoDatasource.java
===================================================================
---
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/ExoDatasource.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/ExoDatasource.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -59,7 +59,6 @@
final public static int SQL_SERVER_TYPE = 6;
- // TODO need remove
static int totalGetConnect = 0;
// static int totalCommit = 0;
Modified:
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/ReflectionMapper.java
===================================================================
---
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/ReflectionMapper.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/ReflectionMapper.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -136,7 +136,6 @@
return getField(clazz.getSuperclass(), name);
}
- // TODO will review
private Object getValue(int type, ResultSet resultSet, String name) throws Exception
{
switch (type)
Modified:
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/impl/ExoCacheProvider.java
===================================================================
---
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/impl/ExoCacheProvider.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/impl/ExoCacheProvider.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -56,8 +56,8 @@
try
{
ExoCache<Serializable, Object> cache =
cacheService.getCacheInstance(name);
- cache.setMaxSize(5000); // TODO Do we really need override configuration
- // in this way ?
+ cache.setMaxSize(5000);
+
return new ExoCachePlugin(cache);
}
catch (Exception ex)
Modified:
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/impl/TextClobType.java
===================================================================
---
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/impl/TextClobType.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.database/src/main/java/org/exoplatform/services/database/impl/TextClobType.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -72,144 +72,6 @@
return (x == y) || (x != null && x.equals(y));
}
- // TODO cleanup, fix of COR-129. [06.03.2009]
- // private void nullSafeSetOld(PreparedStatement stmt, Object value, int index)
throws HibernateException,
- //
SQLException {
- //
- // // if this is a PreparedStatement wrapper, get the underlying
- // // PreparedStatement
- // PreparedStatement realStatement = getRealStatement(stmt);
- //
- // DatabaseMetaData dbMetaData = realStatement.getConnection().getMetaData();
- //
- // if (value == null) {
- // stmt.setNull(index, sqlTypes()[0]);
- // } else if (ORACLE_DRIVER_NAME.equals(dbMetaData.getDriverName())) {
- // if ((dbMetaData.getDriverMajorVersion() >= ORACLE_DRIVER_MAJOR_VERSION)
- // && (dbMetaData.getDriverMinorVersion() >=
ORACLE_DRIVER_MINOR_VERSION)) {
- // try {
- // // Code compliments of Scott Miller
- // // support oracle clobs without requiring oracle libraries
- // // at compile time
- // // Note this assumes that if you are using the Oracle
- // // Driver.
- // // then you have access to the oracle.sql.CLOB class
- //
- // // First get the oracle clob class
- // Class oracleClobClass = Class.forName("oracle.sql.CLOB");
- //
- // // Get the oracle connection class for checking
- // Class oracleConnectionClass =
Class.forName("oracle.jdbc.OracleConnection");
- //
- // // now get the static factory method
- // Class partypes[] = new Class[3];
- // partypes[0] = Connection.class;
- // partypes[1] = Boolean.TYPE;
- // partypes[2] = Integer.TYPE;
- // Method createTemporaryMethod =
oracleClobClass.getDeclaredMethod("createTemporary",
- //
partypes);
- // // now get ready to call the factory method
- // Field durationSessionField =
oracleClobClass.getField("DURATION_SESSION");
- // Object arglist[] = new Object[3];
- // Connection conn = realStatement.getConnection();
- //
- // // Make sure connection object is right type
- // if (!oracleConnectionClass.isAssignableFrom(conn.getClass())) {
- // throw new HibernateException("JDBC connection object must be a
oracle.jdbc.OracleConnection. "
- // + "Connection class is " + conn.getClass().getName());
- // }
- //
- // arglist[0] = conn;
- // arglist[1] = Boolean.TRUE;
- // arglist[2] = durationSessionField.get(null); // null is
- // // valid
- // // because of
- // // static field
- //
- // // Create our CLOB
- // Object tempClob = createTemporaryMethod.invoke(null, arglist); // null
- // // is
- // // valid
- // // because
- // // of
- // // static
- // // method
- //
- // // get the open method
- // partypes = new Class[1];
- // partypes[0] = Integer.TYPE;
- // Method openMethod = oracleClobClass.getDeclaredMethod("open",
partypes);
- //
- // // prepare to call the method
- // Field modeReadWriteField =
oracleClobClass.getField("MODE_READWRITE");
- // arglist = new Object[1];
- // arglist[0] = modeReadWriteField.get(null); // null is valid
- // // because of
- // // static field
- //
- // // call open(CLOB.MODE_READWRITE);
- // openMethod.invoke(tempClob, arglist);
- //
- // // get the getCharacterOutputStream method
- // // Method getCharacterOutputStreamMethod =
- // // oracleClobClass.getDeclaredMethod(
- // // "getCharacterOutputStream", null );
- //
- // // use getAsciiOutputStream for special characters,
- // // using the Writer obtained from 'getCharacterOutputStream"
- // // causes
- // // 'No more data to read from socket' when inserting special
- // // characters
- // Method getAsciiOutputStreamMethod =
oracleClobClass.getDeclaredMethod("getAsciiOutputStream",
- //
null);
- //
- // // call the getCharacterOutpitStream method
- // OutputStream tempClobOutputStream = (OutputStream)
getAsciiOutputStreamMethod.invoke(tempClob,
- //
null);
- //
- // // write the string to the clob
- // tempClobOutputStream.write(((String) value).getBytes());
- // tempClobOutputStream.flush();
- // tempClobOutputStream.close();
- //
- // // get the close method
- // Method closeMethod = oracleClobClass.getDeclaredMethod("close",
null);
- //
- // // call the close method
- // closeMethod.invoke(tempClob, null);
- //
- // // add the clob to the statement
- // realStatement.setClob(index, (Clob) tempClob);
- // } catch (ClassNotFoundException e) {
- // // could not find the class with reflection
- // throw new HibernateException("Unable to find a required
class.\n" + e.getMessage());
- // } catch (NoSuchMethodException e) {
- // // could not find the metho with reflection
- // throw new HibernateException("Unable to find a required
method.\n" + e.getMessage());
- // } catch (NoSuchFieldException e) {
- // // could not find the field with reflection
- // throw new HibernateException("Unable to find a required
field.\n" + e.getMessage());
- // } catch (IllegalAccessException e) {
- // throw new HibernateException("Unable to access a required method or
field.\n"
- // + e.getMessage());
- // } catch (InvocationTargetException e) {
- // throw new HibernateException(e.getMessage());
- // } catch (IOException e) {
- // throw new HibernateException(e.getMessage());
- // }
- // } else {
- // throw new HibernateException("No CLOBS support. Use driver version
"
- // + ORACLE_DRIVER_MAJOR_VERSION + ", minor " +
ORACLE_DRIVER_MINOR_VERSION);
- // }
- // } else {
- // // this is the default way to handle Clobs that seems to work with
- // // most Databases
- // String str = (String) value;
- // StringReader r = new StringReader(str);
- // stmt.setCharacterStream(index, r, str.length());
- // }
- // }
-
/**
* {@inheritDoc}
*/
Modified:
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/DocumentReader.java
===================================================================
---
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/DocumentReader.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/DocumentReader.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -39,8 +39,8 @@
/**
* @param is
* @return document content
- * @throws IOException TODO
- * @throws DocumentReadException TODO
+ * @throws IOException
+ * @throws DocumentReadException
*/
String getContentAsText(InputStream is) throws IOException, DocumentReadException;
@@ -48,8 +48,8 @@
* @param is data input stream
* @param encoding char set for input stream
* @return document content
- * @throws IOException TODO
- * @throws DocumentReadException TODO
+ * @throws IOException
+ * @throws DocumentReadException
*/
String getContentAsText(InputStream is, String encoding) throws IOException,
DocumentReadException;
@@ -57,9 +57,8 @@
* @param mimeType
* @return metainfo properties reduced to some supported metadata set (Dublin
* Core or other)
- * @throws IOException TODO
- * @throws DocumentReadException TODO
+ * @throws IOException
+ * @throws DocumentReadException
*/
Properties getProperties(InputStream is) throws IOException, DocumentReadException;
-
-}
+}
\ No newline at end of file
Modified:
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/HTMLDocumentReader.java
===================================================================
---
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/HTMLDocumentReader.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/HTMLDocumentReader.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -95,7 +95,7 @@
StringBean sb = new StringBean();
// read links or not
- // sb.setLinks(true); //TODO make this configurable
+ // sb.setLinks(true);
// extract text
parser.visitAllNodesWith(sb);
Modified:
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/TikaDocumentReader.java
===================================================================
---
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/TikaDocumentReader.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/TikaDocumentReader.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -318,7 +318,7 @@
convertProperty(metadata, props, DCMetaData.COVERAGE,
DublinCore.COVERAGE);
convertProperty(metadata, props, DCMetaData.CREATOR,
new String[]{MSOffice.AUTHOR, DublinCore.CREATOR});
- //TODO different parsers return date in different formats, so keep it
as String
+ // different parsers return date in different formats, so keep it as
String
convertProperty(metadata, props, DCMetaData.DATE, new
String[]{DublinCore.DATE, MSOffice.LAST_SAVED,
MSOffice.CREATION_DATE});
convertProperty(metadata, props, DCMetaData.DESCRIPTION, new
String[]{DublinCore.DESCRIPTION,
Modified:
core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/ObjectClassAttribute.java
===================================================================
---
core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/ObjectClassAttribute.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/ObjectClassAttribute.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -35,4 +35,4 @@
for (String clazz : classes)
add(clazz);
}
-}
+}
\ No newline at end of file
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/Group.java
===================================================================
---
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/Group.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/Group.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -45,9 +45,7 @@
public String getGroupName();
/**
- * @param name the local name for the group TODO This method should be called
- * once only and should be set in the
- * GroupHandler.createGroupInstance() method
+ * @param name the local name for the group
*/
public void setGroupName(String name);
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/GroupHandler.java
===================================================================
---
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/GroupHandler.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/GroupHandler.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -103,12 +103,7 @@
* @return Return the removed group.
* @throws Exception An exception is throwed if the method fail to remove the
* group from the database, the group is not existed in the
- * database, or any listener fail to handle the event. TODO
- * Currently the implementation simply remove the children group
- * without broadcasting the event. We should add the parameter
- * 'recursive' to the parameter list so the third party can have
- * more control. Also should we broadcast the membership remove
- * event
+ * database, or any listener fail to handle the event.
*/
public Group removeGroup(Group group, boolean broadcast) throws Exception;
@@ -122,9 +117,7 @@
* the membershipType is null, it should mean any membership type.
* @return A collection of the found groups
* @throws Exception An exception is throwed if the method cannot access the
- * database. TODO currently the implementation should not handle the
- * case of membershipType is null. Also we should merge this method
- * with the findGroupsOfUser method.
+ * database.
*/
public Collection findGroupByMembership(String userName, String membershipType) throws
Exception;
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/MembershipType.java
===================================================================
---
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/MembershipType.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/MembershipType.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -38,9 +38,7 @@
public String getName();
/**
- * @param s The name of the membership type TODO This method should not be
- * available to the developer as it should call only once, When a new
- * membership type record is created
+ * @param s The name of the membership type
*/
public void setName(String s);
@@ -70,9 +68,7 @@
public Date getCreatedDate();
/**
- * @param d the created date TODO This method should be managed by the
- * organization service and the developer should not called this
- * method.
+ * @param d the created date
*/
public void setCreatedDate(Date d);
@@ -82,8 +78,7 @@
public Date getModifiedDate();
/**
- * @param d the modified date TODO this field should be managed by the
- * organization service and developer should not called this method.
+ * @param d the modified date
*/
public void setModifiedDate(Date d);
}
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/MembershipTypeEventListenerHandler.java
===================================================================
---
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/MembershipTypeEventListenerHandler.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/MembershipTypeEventListenerHandler.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -28,10 +28,10 @@
{
/**
- * Return list of MembershipTypeEventListener. List should be unmodifiable to prevent
modification outside of MembershipTypeHandler.
+ * Return list of MembershipTypeEventListener. List should be unmodifiable
+ * to prevent modification outside of MembershipTypeHandler.
*
* @return list of MembershipTypeEventListener
*/
public List<MembershipTypeEventListener> getMembershipTypeListeners();
-
-}
+}
\ No newline at end of file
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/MembershipTypeHandler.java
===================================================================
---
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/MembershipTypeHandler.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/MembershipTypeHandler.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -31,9 +31,6 @@
* type and delete the membership type event. Each event should have 2 phases: pre event
and post
* event. The method createMembershipType(..) , saveMembershipType(..) and
removeMembershipType
* broadcast the event at each phase so the listeners can handle the event properly
- *
- * TODO Currently the membership type handler do not support the listener and
broadcasting. We
- * should implement this and broadcast the event properly.
*/
public interface MembershipTypeHandler
{
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/OrganizationConfig.java
===================================================================
---
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/OrganizationConfig.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/OrganizationConfig.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -106,7 +106,6 @@
private String parentId;
- // TODO: Tung.Pham added
private String label;
// --------------------------------------
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/User.java
===================================================================
---
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/User.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/User.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -45,10 +45,7 @@
* This method is used to change the username
*
* @param s
- * @deprecated The third party developer should not used this method TODO: I
- * think we should not have this method. the username should be
- * set only for the first time. So we can pass the username to the @see
- * UserHandler createUserInstance() method.
+ * @deprecated The third party developer should not used this method
*/
public void setUserName(String s);
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserHandler.java
===================================================================
---
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserHandler.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserHandler.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -101,9 +101,7 @@
* broadcasted to all registered listener
* @return return the User object after that user has beed removed from
* database
- * @throws Exception
- * @TODO Should we broadcast the membership remove event when a user is
- * removed ??
+ * @throws Exception
*/
public User removeUser(String userName, boolean broadcast) throws Exception;
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserProfile.java
===================================================================
---
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserProfile.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserProfile.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -32,10 +32,6 @@
*/
public interface UserProfile
{
- /**
- * TODO Those keys should be moved to the UserProfile portlet. The
- * organization service should be generic.
- */
/**
* The predefine attributes of the user personal info. Those attributes are
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserProfileHandler.java
===================================================================
---
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserProfileHandler.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/UserProfileHandler.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -66,9 +66,7 @@
* @param broadcast Broadcast the event the listeners if broadcast is true.
* @return The UserProfile instance that has been removed.
* @throws Exception Throw exception if the method fail to remove the record
- * or any listener fail to handle the event TODO Should we provide
- * this method or the user profile should be removed only when the
- * user is removed
+ * or any listener fail to handle the event
*/
public UserProfile removeUserProfile(String userName, boolean broadcast) throws
Exception;
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/auth/OrganizationAuthenticatorImpl.java
===================================================================
---
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/auth/OrganizationAuthenticatorImpl.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/auth/OrganizationAuthenticatorImpl.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -45,7 +45,7 @@
/**
* Created by The eXo Platform SAS . An authentication wrapper over Organization
- * service TODO move it to Organization Service / Auth
+ * service
*
* @author Gennady Azarenkov
* @version $Id:$
Modified:
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/impl/mock/DummyOrganizationService.java
===================================================================
---
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/impl/mock/DummyOrganizationService.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.api/src/main/java/org/exoplatform/services/organization/impl/mock/DummyOrganizationService.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -179,7 +179,6 @@
usr.setPassword("admin");
users.add(usr);
- // TODO for what?
usr = new UserImpl("weblogic");
usr.setPassword("11111111");
users.add(usr);
@@ -404,7 +403,6 @@
}
else
{
- // TODO is it right?
return new DummyGroup("", "/" + groupId, groupId);
}
}
Modified:
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/UserProfileData.java
===================================================================
---
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/UserProfileData.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/UserProfileData.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -35,7 +35,7 @@
@TableField(name = "PROFILE", type = "string", length = 2000)})
public class UserProfileData extends DBObject
{
- // TODO: use jibx
+
static transient private XStream xstream_;
private String userName;
Modified:
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/listeners/MembershipListener.java
===================================================================
---
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/listeners/MembershipListener.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/listeners/MembershipListener.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -31,8 +31,6 @@
@Override
public void onEvent(Event arg0) throws Exception
{
- // TODO Auto-generated method stub
}
-
-}
+}
\ No newline at end of file
Modified:
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/listeners/MembershipTypeListener.java
===================================================================
---
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/listeners/MembershipTypeListener.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/listeners/MembershipTypeListener.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -31,8 +31,6 @@
@Override
public void onEvent(Event arg0) throws Exception
{
- // TODO Auto-generated method stub
}
-
-}
+}
\ No newline at end of file
Modified:
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/listeners/UserListener.java
===================================================================
---
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/listeners/UserListener.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.jdbc/src/main/java/org/exoplatform/services/organization/jdbc/listeners/UserListener.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -31,8 +31,6 @@
@Override
public void onEvent(Event arg0) throws Exception
{
- // TODO Auto-generated method stub
}
-
-}
+}
\ No newline at end of file
Modified:
core/trunk/exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/LDAPAttributeMapping.java
===================================================================
---
core/trunk/exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/LDAPAttributeMapping.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/LDAPAttributeMapping.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -65,11 +65,9 @@
public String baseURL, groupsURL, membershipTypeURL, userURL, profileURL;
- // TODO remove initialization in major release. It may be not initialized from
// for AD.
String userDNKey = "cn";
- //TODO remove initialization in major release. Should be initialized from
// configuration.
String groupDNKey = "ou";
@@ -103,7 +101,6 @@
String ldapCreatedTimeStampAttr, ldapModifiedTimeStampAttr, ldapDescriptionAttr;
- // TODO remove initialization in major release. Should be initialized from
// configuration.
String groupNameAttr = "ou";
@@ -261,9 +258,7 @@
if (PROFILE_LDAP_CLASSES == null)
PROFILE_LDAP_CLASSES = profileLDAPClasses.split(",");
attrs.put(new ObjectClassAttribute(PROFILE_LDAP_CLASSES));
- // TODO
http://jira.exoplatform.org/browse/COR-49
- // Comment: at the time profiles are stored in bd.
- // 27.03.2009
+
attrs.put("sn", profile.getUserName());
UserProfileData upd = new UserProfileData();
upd.setUserProfile(profile);
Modified:
core/trunk/exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/UserDAOImpl.java
===================================================================
---
core/trunk/exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/UserDAOImpl.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/UserDAOImpl.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -197,7 +197,7 @@
{
ldapService.release(ctx);
}
- // TODO really need this ?
+
if (existingUser != null &&
(!user.getPassword().equals(existingUser.getPassword())))
{
saveUserPassword(user, userDN);
Modified:
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/DigestPasswordEncrypter.java
===================================================================
---
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/DigestPasswordEncrypter.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/DigestPasswordEncrypter.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -99,7 +99,7 @@
}
catch (NoSuchAlgorithmException e)
{
- //TODO add exologger
+
}
// calculate MD5 hash of A1 string
String a1 = username + ":" + realm + ":" + new
String(plainPassword);
Modified:
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/Identity.java
===================================================================
---
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/Identity.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/Identity.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -139,7 +139,6 @@
*/
public Set<String> getGroups()
{
- // TODO : Need to protect group's set ??
Set<String> groups = new HashSet<String>();
for (MembershipEntry m : memberships)
{
Modified:
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/j2ee/DigestAuthenticationJettyLoginModule.java
===================================================================
---
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/j2ee/DigestAuthenticationJettyLoginModule.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/j2ee/DigestAuthenticationJettyLoginModule.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -95,7 +95,7 @@
identity = authenticator.createIdentity(userId);
sharedState.put("javax.security.auth.login.name", userId);
- // TODO use PasswordCredential wrapper
+
subject.getPrivateCredentials().add(getPassword());
subject.getPublicCredentials().add(getUsername());
}
Modified:
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/AbstractLoginModule.java
===================================================================
---
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/AbstractLoginModule.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/AbstractLoginModule.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -108,7 +108,6 @@
*/
protected ExoContainer getContainer() throws Exception
{
- // TODO set correct current container
ExoContainer container = ExoContainerContext.getCurrentContainer();
if (container instanceof RootContainer)
{
Modified:
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/DefaultLoginModule.java
===================================================================
---
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/DefaultLoginModule.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/DefaultLoginModule.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -117,7 +117,7 @@
String userId = authenticator.validateUser(credentials);
identity = authenticator.createIdentity(userId);
sharedState.put("javax.security.auth.login.name", userId);
- // TODO use PasswordCredential wrapper
+
subject.getPrivateCredentials().add(password);
subject.getPublicCredentials().add(new UsernameCredential(username));
}
@@ -149,7 +149,6 @@
if (singleLogin && identityRegistry.getIdentity(identity.getUserId()) !=
null)
throw new LoginException("User " + identity.getUserId() + "
already logined.");
- // TODO Remove subject from identity if nod need it in eXo environment.
// Do not need implement logout by self if use tomcat 6.0.21 and later.
// See deprecation comments in
// org.exoplatform.services.security.web.JAASConversationStateListener
Modified:
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/IdentitySetLoginModule.java
===================================================================
---
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/IdentitySetLoginModule.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/IdentitySetLoginModule.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -92,14 +92,12 @@
throw new LoginException("User " + userId + " already
logined.");
Identity identity = authenticator.createIdentity(userId);
- // TODO Remove subject from identity if nod need it in eXo environment.
// Do not need implement logout by self if use tomcat 6.0.21 and later.
// See deprecation comments in
// org.exoplatform.services.security.web.JAASConversationStateListener
identity.setSubject(subject);
identityRegistry.register(identity);
-
}
catch (Exception e)
{
Modified:
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/SharedStateLoginModule.java
===================================================================
---
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/SharedStateLoginModule.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/jaas/SharedStateLoginModule.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -70,7 +70,7 @@
sharedState.put("exo.security.identity", identity);
sharedState.put("javax.security.auth.login.name", userId);
- // TODO use PasswordCredential wrapper
+
subject.getPrivateCredentials().add(password);
subject.getPublicCredentials().add(new UsernameCredential(username));
return true;
Modified:
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/web/SetCurrentIdentityFilter.java
===================================================================
---
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/web/SetCurrentIdentityFilter.java 2011-12-22
13:08:06 UTC (rev 5341)
+++
core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/web/SetCurrentIdentityFilter.java 2011-12-22
14:22:44 UTC (rev 5342)
@@ -147,7 +147,6 @@
{
state = new ConversationState(identity);
// Keep subject as attribute in ConversationState.
- // TODO remove this, do not need it any more.
state.setAttribute(ConversationState.SUBJECT, identity.getSubject());
}
else