mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD (5.2) to 5.2.N (5.2.1)
126381 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2) 120439 jvonka: RA-630: FileFolder API - update antlr grammar in REST fwk for select/where clause - to allow colon in property name identifier (json path) - also update impl + test git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126727 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -32,7 +32,7 @@ import org.alfresco.rest.framework.resource.parameters.where.InvalidQueryExcepti
|
||||
}
|
||||
|
||||
@parser::members {
|
||||
|
||||
|
||||
// These methods are here to force the parser to error instead of suppressing problems.
|
||||
// @Override
|
||||
// public void reportError(RecognitionException e) {
|
||||
@@ -45,15 +45,15 @@ import org.alfresco.rest.framework.resource.parameters.where.InvalidQueryExcepti
|
||||
{
|
||||
throw new MismatchedTokenException(ttype, input);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object recoverFromMismatchedSet(IntStream input, RecognitionException e, BitSet follow) throws RecognitionException
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
//
|
||||
//
|
||||
// @Override
|
||||
// public String getErrorMessage(RecognitionException e, String[] tokenNames)
|
||||
// public String getErrorMessage(RecognitionException e, String[] tokenNames)
|
||||
// {
|
||||
// System.out.println("THROW ME...\n" + e);
|
||||
// throw new InvalidQueryException(e.getMessage());
|
||||
@@ -84,10 +84,12 @@ GREATERTHANOREQUALS: WS?'>='WS?;
|
||||
LEFTPAREN: '(';
|
||||
RIGHTPAREN: ')';
|
||||
COMMA: ',';
|
||||
COLON: ':';
|
||||
SINGLEQUOTE: '\'';
|
||||
PROPERTYVALUE: (SINGLEQUOTE (~SINGLEQUOTE|'\\'SINGLEQUOTE)* SINGLEQUOTE) |IDENTIFIERDIGIT+;
|
||||
PROPERTYNAME: '/'? IDENTIFIER ('/'IDENTIFIER)*;
|
||||
fragment IDENTIFIER : (IDENTIFIERLETTER (IDENTIFIERLETTER | IDENTIFIERDIGIT)*);
|
||||
fragment IDENTIFIERLETTERORDIGIT: (IDENTIFIERLETTER | IDENTIFIERDIGIT);
|
||||
fragment IDENTIFIER : (IDENTIFIERLETTER (IDENTIFIERLETTERORDIGIT* | (IDENTIFIERLETTERORDIGIT* COLON IDENTIFIERLETTERORDIGIT*)));
|
||||
WS : ( ' ' | '\t' | '\r' | '\n' )+ { $channel = HIDDEN; };
|
||||
fragment IDENTIFIERLETTER // any Unicode character that is a Java letter (see below)
|
||||
: '\u0041'..'\u005a' // A-Z
|
||||
@@ -139,7 +141,7 @@ propertyvaluepair: value COMMA value -> value+;
|
||||
propertyvaluelist: value (COMMA value)* -> value+;
|
||||
value: a=PROPERTYVALUE -> ^(PROPERTYVALUE[$a] )
|
||||
| b=PROPERTYNAME -> ^(PROPERTYVALUE[$b] ); //rewrite this a propertyvalue
|
||||
selectClause: PROPERTYNAME (COMMA PROPERTYNAME)* -> PROPERTYNAME+;
|
||||
selectClause: PROPERTYNAME (COMMA PROPERTYNAME)* -> PROPERTYNAME+;
|
||||
// ****
|
||||
// SOME NOTES
|
||||
// () - Parentheses. Used to group several elements, so they are treated as one single token
|
||||
@@ -149,4 +151,4 @@ selectClause: PROPERTYNAME (COMMA PROPERTYNAME)* -> PROPERTYNAME+;
|
||||
// . - Any character/token can occur one time
|
||||
// ~ - Any character/token following the ~ may not occur at the current place
|
||||
// .. - Between two characters .. spans a range which accepts every character between both boundaries inclusive
|
||||
// ****
|
||||
// ****
|
||||
|
@@ -1,22 +1,24 @@
|
||||
AND=4
|
||||
BETWEEN=5
|
||||
COMMA=6
|
||||
EQUALS=7
|
||||
EXISTS=8
|
||||
GREATERTHAN=9
|
||||
GREATERTHANOREQUALS=10
|
||||
IDENTIFIER=11
|
||||
IDENTIFIERDIGIT=12
|
||||
IDENTIFIERLETTER=13
|
||||
IN=14
|
||||
LEFTPAREN=15
|
||||
LESSTHAN=16
|
||||
LESSTHANOREQUALS=17
|
||||
MATCHES=18
|
||||
NEGATION=19
|
||||
OR=20
|
||||
PROPERTYNAME=21
|
||||
PROPERTYVALUE=22
|
||||
RIGHTPAREN=23
|
||||
SINGLEQUOTE=24
|
||||
WS=25
|
||||
COLON=6
|
||||
COMMA=7
|
||||
EQUALS=8
|
||||
EXISTS=9
|
||||
GREATERTHAN=10
|
||||
GREATERTHANOREQUALS=11
|
||||
IDENTIFIER=12
|
||||
IDENTIFIERDIGIT=13
|
||||
IDENTIFIERLETTER=14
|
||||
IDENTIFIERLETTERORDIGIT=15
|
||||
IN=16
|
||||
LEFTPAREN=17
|
||||
LESSTHAN=18
|
||||
LESSTHANOREQUALS=19
|
||||
MATCHES=20
|
||||
NEGATION=21
|
||||
OR=22
|
||||
PROPERTYNAME=23
|
||||
PROPERTYVALUE=24
|
||||
RIGHTPAREN=25
|
||||
SINGLEQUOTE=26
|
||||
WS=27
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1546,8 +1546,6 @@ public class NodesImpl implements Nodes
|
||||
str = str.substring(PREFIX.length());
|
||||
}
|
||||
|
||||
str = str.replaceFirst("_", ":"); // FIXME remove this when we have fixed the framework.
|
||||
|
||||
QName name = createQName(str);
|
||||
if (!EXCLUDED_PROPS.contains(name))
|
||||
{
|
||||
|
@@ -339,7 +339,7 @@ public class NodeApiTest extends AbstractBaseApiTest
|
||||
AuthenticationUtil.setFullyAuthenticatedUser(user1);
|
||||
// request property via select
|
||||
Map<String, String> params = new LinkedHashMap<>();
|
||||
params.put("select", "cm_lastThumbnailModification");// TODO replace the underscore with colon when the framework is fixed.
|
||||
params.put("select", "cm:lastThumbnailModification");
|
||||
params.put("orderBy", "isFolder DESC,modifiedAt DESC");
|
||||
response = getAll(getChildrenUrl(myFilesNodeRef), user1, paging, params, 200);
|
||||
nodes = jacksonUtil.parseEntries(response.getJsonResponse(), Document.class);
|
||||
|
Reference in New Issue
Block a user