Merged V2.1 to HEAD

6606: Removed annoying warning message shown when developing custom client side validation handlers
   6607: Fixed lock removal bug when deleting sandbox.
   6608: Fix for AWC-601  - simple/advanced search user error message now "friendly" when lucene query parser exception occurs.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6747 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-09-11 03:16:28 +00:00
parent 1ef35756f8
commit fd2ee9fde1
4 changed files with 12 additions and 5 deletions

View File

@@ -1665,6 +1665,7 @@ error_noderef=Unable to find the repository item referenced by Id: {0} - the rec
error_deleted_folder=The folder item referenced by Id: {0} - has been deleted from the database. The system has changed your folder location as the folder you were in no longer exists.
error_homespace=The Home Space node referenced by Id: {0} cannot be found. It may have been deleted from the database. Please contact your system administrator.
error_search=Search failed due to system error: {0}
error_search_query=Search failed as the system was unable to process your query, please try a different search.
error_not_found={0} not found in {1}.
error_exists=A Space or File with that name already exists: {0}
error_delete_space=Unable to delete Space due to system error:

View File

@@ -43,6 +43,7 @@ import org.alfresco.config.ConfigElement;
import org.alfresco.config.ConfigService;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.search.SearcherException;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.dictionary.TypeDefinition;
import org.alfresco.service.cmr.lock.LockService;
@@ -1011,9 +1012,17 @@ public class BrowseBean implements IContextListener
this.contentNodes = Collections.<Node>emptyList();
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
}
catch (SearcherException serr)
{
logger.info("Search failed for: " + query, serr);
Utils.addErrorMessage(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_QUERY));
this.containerNodes = Collections.<Node>emptyList();
this.contentNodes = Collections.<Node>emptyList();
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
}
catch (Throwable err)
{
logger.info("Search failed for: " + query);
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_SEARCH), new Object[] {err.getMessage()}), err );
this.containerNodes = Collections.<Node>emptyList();

View File

@@ -500,10 +500,6 @@ public abstract class BaseComponentGenerator implements IComponentGenerator
// NOTE: This is dealt with at the component creation stage
// as a different component is usually required.
}
else
{
logger.warn("Unrecognized constaint object: " + constraint.getClass().getName());
}
}
}
}

View File

@@ -81,6 +81,7 @@ public final class Repository
public static final String ERROR_GENERIC = "error_generic";
public static final String ERROR_NOHOME = "error_homespace";
public static final String ERROR_SEARCH = "error_search";
public static final String ERROR_QUERY = "error_search_query";
public static final String ERROR_EXISTS = "error_exists";
private static final String METADATA_EXTACTER_REGISTRY = "metadataExtracterRegistry";