* @param session
* @param node
* @return TRUE if the reference contains a node that is an Alfresco space, otherwise FALSE
*/
public static boolean isFolder(String username, String password, AuthenticationDetails session, Reference node){
QueryResult queryResult = null;
try {
AuthenticationUtils.startSession(username, password);
session = AuthenticationUtils.getAuthenticationDetails();
queryResult = WebServiceFactory.getRepositoryService().queryChildren(node);
} catch (RepositoryFault e) {
Logging.connectors.warn(
"Alfresco: Repository Error during the queryChildren: "
+ e.getMessage(), e);
} catch (RemoteException e) {
Logging.connectors.warn(
"Alfresco: Remote Error during the queryChildren: "
+ e.getMessage(), e);
} finally {
AuthenticationUtils.endSession();
session = null;
}
if(queryResult!=null){
ResultSet rs = queryResult.getResultSet();
if(rs!=null){
ResultSetRow[] rows = rs.getRows();
if(rows!=null){
if(rows.length>0){
return true;