diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/acl.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/acl.get.desc.xml index 5dddc4fcc3..4b975a707d 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/acl.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/acl.get.desc.xml @@ -41,5 +41,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/acl.put.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/acl.put.desc.xml index 134eed66cb..56fe336a76 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/acl.put.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/acl.put.desc.xml @@ -44,5 +44,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/allowableactions.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/allowableactions.get.desc.xml index a88f54a0f2..1aec1359c2 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/allowableactions.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/allowableactions.get.desc.xml @@ -42,5 +42,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/changes.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/changes.get.desc.xml index 626de41e49..303a948ac6 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/changes.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/changes.get.desc.xml @@ -35,5 +35,5 @@ admin CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/checkedout.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/checkedout.get.desc.xml index 80addf1a99..7ca78696af 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/checkedout.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/checkedout.get.desc.xml @@ -46,5 +46,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/checkedout.post.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/checkedout.post.desc.xml index c91292838a..d001c6b359 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/checkedout.post.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/checkedout.post.desc.xml @@ -18,5 +18,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/children.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/children.get.desc.xml index fb66288bef..e5d93ddc10 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/children.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/children.get.desc.xml @@ -75,5 +75,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/children.post.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/children.post.desc.xml index 897afb001c..7a12560d10 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/children.post.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/children.post.desc.xml @@ -53,5 +53,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/client/content.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/client/content.get.desc.xml index 269566ac2c..2a443f3aed 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/client/content.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/client/content.get.desc.xml @@ -2,4 +2,5 @@ CMIS Content Stream /cmis/content user + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/cmis.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/cmis.get.desc.xml index a621e4d7b6..9a1e174632 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/cmis.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/cmis.get.desc.xml @@ -17,5 +17,5 @@ user CMIS - public_api + deprecated diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/content.delete.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/content.delete.desc.xml index ec29c1f44a..b4d7a15fac 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/content.delete.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/content.delete.desc.xml @@ -47,5 +47,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/content.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/content.get.desc.xml index 4af15ecd1a..bccd2bb6e8 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/content.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/content.get.desc.xml @@ -58,5 +58,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/content.put.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/content.put.desc.xml index 5dd2a15c81..ea998992a5 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/content.put.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/content.put.desc.xml @@ -52,5 +52,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/descendants.delete.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/descendants.delete.desc.xml index 176f14f7ea..32e866bfea 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/descendants.delete.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/descendants.delete.desc.xml @@ -49,5 +49,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/descendants.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/descendants.get.desc.xml index c5e03ad911..94e8ac45bb 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/descendants.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/descendants.get.desc.xml @@ -72,5 +72,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/index.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/index.get.desc.xml index dffff0e88e..339ffd5cb3 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/index.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/index.get.desc.xml @@ -10,5 +10,5 @@ none required CMIS - public_api + deprecated diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/item.delete.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/item.delete.desc.xml index 0b96da3965..329f2307aa 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/item.delete.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/item.delete.desc.xml @@ -38,5 +38,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/item.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/item.get.desc.xml index 913b6de350..49ab22512d 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/item.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/item.get.desc.xml @@ -77,5 +77,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/item.patch.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/item.patch.desc.xml index 966d9851ad..7e4ba03d26 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/item.patch.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/item.patch.desc.xml @@ -44,5 +44,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/item.put.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/item.put.desc.xml index 93a60333e1..fcae8ab99b 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/item.put.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/item.put.desc.xml @@ -44,5 +44,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/parent.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/parent.get.desc.xml index 510e28379d..f8c7e4b9b8 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/parent.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/parent.get.desc.xml @@ -54,5 +54,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/parents.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/parents.get.desc.xml index f3c5d5b278..0087bd6c59 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/parents.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/parents.get.desc.xml @@ -63,5 +63,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/policies.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/policies.get.desc.xml index 58966b0bf5..c3928211ee 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/policies.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/policies.get.desc.xml @@ -50,5 +50,5 @@ guest argument CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/policies.post.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/policies.post.desc.xml index 0a4b353219..113ebc7485 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/policies.post.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/policies.post.desc.xml @@ -44,5 +44,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.delete.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.delete.desc.xml index a518942a16..ebdd101f9c 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.delete.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.delete.desc.xml @@ -25,5 +25,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.get.desc.xml index 63bf426092..1131857f9c 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.get.desc.xml @@ -48,5 +48,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.patch.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.patch.desc.xml index 212c644ebf..7cd55733e4 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.patch.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.patch.desc.xml @@ -43,5 +43,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.put.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.put.desc.xml index 212c644ebf..7cd55733e4 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.put.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/pwc.put.desc.xml @@ -43,5 +43,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.desc.xml index 77d126d235..1089ead385 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.desc.xml @@ -19,5 +19,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/query.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/query.get.desc.xml index 787550864f..8b4f503589 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/query.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/query.get.desc.xml @@ -47,5 +47,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/relallowableactions.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/relallowableactions.get.desc.xml index c5005de05e..289dc1591d 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/relallowableactions.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/relallowableactions.get.desc.xml @@ -22,5 +22,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/relationship.delete.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/relationship.delete.desc.xml index c85ed94f91..b8a37fcedd 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/relationship.delete.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/relationship.delete.desc.xml @@ -17,5 +17,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/relationship.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/relationship.get.desc.xml index 3794a157c6..2c4c4dde5c 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/relationship.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/relationship.get.desc.xml @@ -30,5 +30,5 @@ guest CMIS - public_api + deprecated diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/relationships.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/relationships.get.desc.xml index 3e24a4c365..c67d4b4a66 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/relationships.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/relationships.get.desc.xml @@ -73,5 +73,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/relationships.post.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/relationships.post.desc.xml index e47b860895..d94d61804e 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/relationships.post.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/relationships.post.desc.xml @@ -44,5 +44,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/test.post.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/test.post.desc.xml index 279fae8eb1..f5dfa913bd 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/test.post.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/test.post.desc.xml @@ -37,5 +37,5 @@ none CMIS - public_api + deprecated diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/tree.delete.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/tree.delete.desc.xml index 0dec0872e9..f6ba335013 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/tree.delete.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/tree.delete.desc.xml @@ -48,5 +48,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/tree.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/tree.get.desc.xml index 29ade057c8..a176ec1d92 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/tree.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/tree.get.desc.xml @@ -68,5 +68,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/type.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/type.get.desc.xml index 803abc0db2..d0c0c8519e 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/type.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/type.get.desc.xml @@ -27,5 +27,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/typechildren.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/typechildren.get.desc.xml index 5bc45f8b22..201857f58e 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/typechildren.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/typechildren.get.desc.xml @@ -36,5 +36,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/typedescendants.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/typedescendants.get.desc.xml index 4db98f5447..f604b33812 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/typedescendants.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/typedescendants.get.desc.xml @@ -33,5 +33,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/unfiled.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/unfiled.get.desc.xml index 98fabf115e..70f9a2dc48 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/unfiled.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/unfiled.get.desc.xml @@ -11,5 +11,5 @@ guest CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/versions.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/cmis/versions.get.desc.xml index 399285aa1d..5c19b277c4 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/versions.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/versions.get.desc.xml @@ -51,5 +51,5 @@ user CMIS - public_api + deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/bulkfilesystemimport/status.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/bulkfilesystemimport/status.get.html.ftl index c026f8653a..c14dbbfe54 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/bulkfilesystemimport/status.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/bulkfilesystemimport/status.get.html.ftl @@ -291,7 +291,9 @@ This page will automatically refresh in ${refreshIntervalInSeconds} seconds. [#else] Initiate another import

- Initiate another in-place import + [#if isEnterprise] + Initiate another in-place import + [/#if] [/#if]

diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.delete.js b/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.delete.js index 0eb9b3a5b2..61b483a92d 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.delete.js +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.delete.js @@ -40,14 +40,14 @@ function main() } // The message depends on the search service in use - var message = "Category successfully removed."; + var messageKey = "message.removeCategory.success"; if (search.searchSubsystem == "solr") { - message = "Category deletion successfully queued with SOLR for removal. Please not that it may take a few moments until it is deleted; you will need to refresh to see the change once it has been actioned"; + messageKey = "message.removeCategory.solr.success"; } // Set model properties - model.message = message; + model.messageKey = messageKey; } main(); diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.delete.json.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.delete.json.ftl index 61837f887f..989ad8343d 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.delete.json.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.delete.json.ftl @@ -1,6 +1,6 @@ { <#if redirect??>"redirect": "${redirect}", - <#if persistedObject??>"persistedObject": "${persistedObject?string}", + <#if persistedObject??>"persistedObject": "${persistedObject?replace("\t", "")?string}", <#if name??>"name": "${name}", - "message": "${message}" + "message": "${msg(messageKey)}" } \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.post.json.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.post.json.ftl index dc1bd8dd41..1bd7b22c2e 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.post.json.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.post.json.ftl @@ -1,6 +1,6 @@ { <#if redirect??>"redirect": "${redirect}", - <#if persistedObject??>"persistedObject": "${persistedObject?string}", - "message": "${message}", + <#if persistedObject??>"persistedObject": "${persistedObject?replace("\t", "")?string}", + "message": "${msg(messageKey)}", "name": "${name}" } \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.post.json.js b/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.post.json.js index 93bcd90d0e..3ea179e865 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.post.json.js +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.post.json.js @@ -81,14 +81,14 @@ function main() } // The message depends on the search service in use - var message = "Successfully added category"; + var messageKey = "message.addCategory.success"; if (search.searchSubsystem == "solr") { - message = "New category successfully queued with SOLR for addition. Please not that it may take a few moments until it is added; you will need to refresh to see the change once it has been actioned"; + messageKey = "message.addCategory.solr.success"; } // Build the rest of the model - model.message = message; + model.messageKey = messageKey; model.name = name; } diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.put.json.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.put.json.ftl index dc1bd8dd41..c1649ece35 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.put.json.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.put.json.ftl @@ -1,6 +1,6 @@ { <#if redirect??>"redirect": "${redirect}", - <#if persistedObject??>"persistedObject": "${persistedObject?string}", - "message": "${message}", + <#if persistedObject??>"persistedObject": "${persistedObject?replace("\t", "")?string)}", + "message": "${msg(messageKey)}", "name": "${name}" } \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.put.json.js b/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.put.json.js index cc9a3373c1..f8e976ac54 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.put.json.js +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/category/category.put.json.js @@ -48,15 +48,15 @@ function main() } // The message depends on the search service in use - var message = "Successfully changed name of category"; + var messageKey = "message.changeCategoryName.success"; if (search.searchSubsystem == "solr") { - message = "Category update successfully queued with SOLR for changes. Please not that it may take a few moments until it is updated; you will need to refresh to see the change once it has been actioned"; + messageKey = "message.changeCategoryName.solr.success"; } // Build the rest of the model model.persistedObject = category.toString(); - model.message = message; + model.messageKey = messageKey; model.name = name; } diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/content/mimetype-descriptions.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/repository/content/mimetype-descriptions.get.desc.xml new file mode 100644 index 0000000000..037d743aea --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/content/mimetype-descriptions.get.desc.xml @@ -0,0 +1,14 @@ + + For all known Mime Types, return their descriptions + + Returns a list of all mime types, along with their descriptions, such as + "MS Project" for "application/vnd.ms-project", and their normal file + extensions. + This information is retrieved from the Mimetype Service, based on the + mimetype map(s) defined for the repository. + + /api/mimetypes/descriptions + + none + required + diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/content/mimetype-descriptions.get.json.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/content/mimetype-descriptions.get.json.ftl new file mode 100644 index 0000000000..947da8b24f --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/content/mimetype-descriptions.get.json.ftl @@ -0,0 +1,21 @@ +{ + "data": { +<#escape x as jsonUtils.encodeJSONString(x)> + <#list mimetypes?keys as mimetype> + "${mimetype}": { + "description": "${mimetypes[mimetype]}", + "extensions": { + "default": "${defaultExtensions[mimetype]}", + "additional": [ + <#if (otherExtensions[mimetype])?has_content> + <#list otherExtensions[mimetype] as ext> + "${ext}"<#if ext_has_next>, + + + ] + } + }<#if mimetype_has_next>, + + + } +} diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/invite/invites.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/repository/invite/invites.get.desc.xml index db1ef5d1ec..9beba49139 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/invite/invites.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/invite/invites.get.desc.xml @@ -5,5 +5,6 @@ /api/invites?inviteId={inviteId} argument user + required deprecated \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/site/membership/potentialmembers.get.js b/config/alfresco/templates/webscripts/org/alfresco/repository/site/membership/potentialmembers.get.js index ef85f91298..a703600264 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/site/membership/potentialmembers.get.js +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/site/membership/potentialmembers.get.js @@ -20,13 +20,19 @@ function main() var peopleFound = [], groupsFound = [], notAllowed = [], - i, ii, name, paging; + i, ii, name, paging, + siteInvitations = []; if (authorityType == null || authorityType == "USER") { // Get the collection of people peopleFound = people.getPeople(filter, maxResults); + var criteria = { + resourceName: siteShortName + }; + siteInvitations = invitations.listInvitations(criteria); + // Filter this collection for site membership for (i = 0, ii = peopleFound.length; i < ii; i++) { @@ -38,11 +44,7 @@ function main() } else { - var criteria = { - resourceName: siteShortName, - inviteeUserName: name - }; - if (invitations.listInvitations(criteria).length != 0) + if (contains(siteInvitations, name)) { // User has already got an invitation notAllowed.push(name); @@ -76,4 +78,12 @@ function main() model.notAllowed = notAllowed; } +function contains(arr, value) { + var i = arr.length; + while (i--) { + if (arr[i].inviteeUserName == value) return true; + } + return false; +} + main(); \ No newline at end of file diff --git a/config/alfresco/web-scripts-application-context.xml b/config/alfresco/web-scripts-application-context.xml index 6ed7711953..04c3ab0cae 100644 --- a/config/alfresco/web-scripts-application-context.xml +++ b/config/alfresco/web-scripts-application-context.xml @@ -529,6 +529,11 @@ + + + + + @@ -1794,6 +1799,7 @@ class="org.alfresco.repo.web.scripts.bulkimport.BulkFilesystemImportStatusWebScript" parent="webscript"> + diff --git a/source/java/org/alfresco/repo/web/scripts/RepoStore.java b/source/java/org/alfresco/repo/web/scripts/RepoStore.java index 4bc2eb61b7..8cac105ffa 100644 --- a/source/java/org/alfresco/repo/web/scripts/RepoStore.java +++ b/source/java/org/alfresco/repo/web/scripts/RepoStore.java @@ -350,19 +350,20 @@ public class RepoStore extends AbstractStore implements TenantDeployer namespaceService, false, SearchService.LANGUAGE_XPATH); - for (NodeRef nodeRef : nodeRefs) - { - if (isContentPresent(nodeRef)) - { - String name = (String)nodeService.getProperty(nodeRef, ContentModel.PROP_NAME); - if (name.startsWith(id)) - { - String nodeDir = getPath(nodeRef); - String documentPath = nodeDir.substring(baseDirLength); - documentPaths.add(documentPath); - } - } - } + documentPaths = new ArrayList(nodeRefs.size()); + for (NodeRef nodeRef : nodeRefs) + { + if (isContentPresent(nodeRef)) + { + String name = (String)nodeService.getProperty(nodeRef, ContentModel.PROP_NAME); + if (name.startsWith(id)) + { + String nodeDir = getPath(nodeRef); + String documentPath = nodeDir.substring(baseDirLength); + documentPaths.add(documentPath); + } + } + } // String query = "+PATH:\"" + repoScriptPath.toPrefixString(namespaceService) + diff --git a/source/java/org/alfresco/repo/web/scripts/bean/LoginTicket.java b/source/java/org/alfresco/repo/web/scripts/bean/LoginTicket.java index 53f43d7938..42994f130d 100644 --- a/source/java/org/alfresco/repo/web/scripts/bean/LoginTicket.java +++ b/source/java/org/alfresco/repo/web/scripts/bean/LoginTicket.java @@ -1,96 +1,96 @@ -/* - * Copyright (C) 2005-2010 Alfresco Software Limited. - * - * This file is part of Alfresco - * - * Alfresco is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Alfresco is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Alfresco. If not, see . - */ -package org.alfresco.repo.web.scripts.bean; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletResponse; - -import org.alfresco.repo.security.authentication.AuthenticationException; -import org.alfresco.repo.security.authentication.AuthenticationUtil; -import org.alfresco.repo.security.authentication.TicketComponent; -import org.springframework.extensions.webscripts.DeclarativeWebScript; -import org.springframework.extensions.webscripts.Status; -import org.springframework.extensions.webscripts.WebScriptException; -import org.springframework.extensions.webscripts.WebScriptRequest; - - -/** - * Login Ticket - * - * @author davidc - */ -public class LoginTicket extends DeclarativeWebScript -{ - // dependencies - private TicketComponent ticketComponent; - - /** - * @param ticketComponent - */ - public void setTicketComponent(TicketComponent ticketComponent) - { - this.ticketComponent = ticketComponent; - } - - - /* (non-Javadoc) - * @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.WebScriptResponse) - */ - @Override - protected Map executeImpl(WebScriptRequest req, Status status) - { - // retrieve ticket from request and current ticket - String ticket = req.getExtensionPath(); - if (ticket == null && ticket.length() == 0) - { - throw new WebScriptException(HttpServletResponse.SC_BAD_REQUEST, "Ticket not specified"); - } - - // construct model for ticket - Map model = new HashMap(1, 1.0f); - model.put("ticket", ticket); - - try - { - String ticketUser = ticketComponent.validateTicket(ticket); - - String currentUser = AuthenticationUtil.getFullyAuthenticatedUser(); - - // do not go any further if tickets are different - // or the user is not fully authenticated - if (currentUser == null || !currentUser.equals(ticketUser)) - { - status.setRedirect(true); - status.setCode(HttpServletResponse.SC_NOT_FOUND); - status.setMessage("Ticket not found"); - } - } - catch (AuthenticationException e) - { - status.setRedirect(true); - status.setCode(HttpServletResponse.SC_NOT_FOUND); - status.setMessage("Ticket not found"); - } - - return model; - } - -} +/* + * Copyright (C) 2005-2010 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ +package org.alfresco.repo.web.scripts.bean; + +import java.util.HashMap; +import java.util.Map; + +import javax.servlet.http.HttpServletResponse; + +import org.alfresco.repo.security.authentication.AuthenticationException; +import org.alfresco.repo.security.authentication.AuthenticationUtil; +import org.alfresco.repo.security.authentication.TicketComponent; +import org.springframework.extensions.webscripts.DeclarativeWebScript; +import org.springframework.extensions.webscripts.Status; +import org.springframework.extensions.webscripts.WebScriptException; +import org.springframework.extensions.webscripts.WebScriptRequest; + + +/** + * Login Ticket + * + * @author davidc + */ +public class LoginTicket extends DeclarativeWebScript +{ + // dependencies + private TicketComponent ticketComponent; + + /** + * @param ticketComponent + */ + public void setTicketComponent(TicketComponent ticketComponent) + { + this.ticketComponent = ticketComponent; + } + + + /* (non-Javadoc) + * @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.WebScriptResponse) + */ + @Override + protected Map executeImpl(WebScriptRequest req, Status status) + { + // retrieve ticket from request and current ticket + String ticket = req.getExtensionPath(); + if (ticket == null || ticket.length() == 0) + { + throw new WebScriptException(HttpServletResponse.SC_BAD_REQUEST, "Ticket not specified"); + } + + // construct model for ticket + Map model = new HashMap(1, 1.0f); + model.put("ticket", ticket); + + try + { + String ticketUser = ticketComponent.validateTicket(ticket); + + String currentUser = AuthenticationUtil.getFullyAuthenticatedUser(); + + // do not go any further if tickets are different + // or the user is not fully authenticated + if (currentUser == null || !currentUser.equals(ticketUser)) + { + status.setRedirect(true); + status.setCode(HttpServletResponse.SC_NOT_FOUND); + status.setMessage("Ticket not found"); + } + } + catch (AuthenticationException e) + { + status.setRedirect(true); + status.setCode(HttpServletResponse.SC_NOT_FOUND); + status.setMessage("Ticket not found"); + } + + return model; + } + +} diff --git a/source/java/org/alfresco/repo/web/scripts/bean/LoginTicketDelete.java b/source/java/org/alfresco/repo/web/scripts/bean/LoginTicketDelete.java index 19b4e3a5f6..f2efc85951 100644 --- a/source/java/org/alfresco/repo/web/scripts/bean/LoginTicketDelete.java +++ b/source/java/org/alfresco/repo/web/scripts/bean/LoginTicketDelete.java @@ -1,108 +1,108 @@ -/* - * Copyright (C) 2005-2010 Alfresco Software Limited. - * - * This file is part of Alfresco - * - * Alfresco is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Alfresco is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Alfresco. If not, see . - */ -package org.alfresco.repo.web.scripts.bean; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletResponse; - -import org.alfresco.repo.security.authentication.AuthenticationException; -import org.alfresco.repo.security.authentication.AuthenticationUtil; -import org.alfresco.repo.security.authentication.TicketComponent; -import org.alfresco.service.cmr.security.AuthenticationService; -import org.springframework.extensions.webscripts.DeclarativeWebScript; -import org.springframework.extensions.webscripts.Status; -import org.springframework.extensions.webscripts.WebScriptException; -import org.springframework.extensions.webscripts.WebScriptRequest; - - -/** - * Delete Login Ticket - * - * @author davidc - */ -public class LoginTicketDelete extends DeclarativeWebScript -{ - // dependencies - private AuthenticationService authenticationService; - private TicketComponent ticketComponent; - - /** - * @param ticketComponent - */ - public void setTicketComponent(TicketComponent ticketComponent) - { - this.ticketComponent = ticketComponent; - } - - /** - * @param authenticationService - */ - public void setAuthenticationService(AuthenticationService authenticationService) - { - this.authenticationService = authenticationService; - } - - - /* (non-Javadoc) - * @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.WebScriptResponse) - */ - @Override - protected Map executeImpl(WebScriptRequest req, Status status) - { - // retrieve ticket from request and current ticket - String ticket = req.getExtensionPath(); - if (ticket == null && ticket.length() == 0) - { - throw new WebScriptException(HttpServletResponse.SC_BAD_REQUEST, "Ticket not specified"); - } - - // construct model for ticket - Map model = new HashMap(1, 1.0f); - model.put("ticket", ticket); - - try - { - String ticketUser = ticketComponent.validateTicket(ticket); - - // do not go any further if tickets are different - if (!AuthenticationUtil.getFullyAuthenticatedUser().equals(ticketUser)) - { - status.setCode(HttpServletResponse.SC_NOT_FOUND); - status.setMessage("Ticket not found"); - } - else - { - // delete the ticket - authenticationService.invalidateTicket(ticket); - status.setMessage("Deleted Ticket " + ticket); - } - } - catch(AuthenticationException e) - { - status.setCode(HttpServletResponse.SC_NOT_FOUND); - status.setMessage("Ticket not found"); - } - - status.setRedirect(true); - return model; - } - -} +/* + * Copyright (C) 2005-2010 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ +package org.alfresco.repo.web.scripts.bean; + +import java.util.HashMap; +import java.util.Map; + +import javax.servlet.http.HttpServletResponse; + +import org.alfresco.repo.security.authentication.AuthenticationException; +import org.alfresco.repo.security.authentication.AuthenticationUtil; +import org.alfresco.repo.security.authentication.TicketComponent; +import org.alfresco.service.cmr.security.AuthenticationService; +import org.springframework.extensions.webscripts.DeclarativeWebScript; +import org.springframework.extensions.webscripts.Status; +import org.springframework.extensions.webscripts.WebScriptException; +import org.springframework.extensions.webscripts.WebScriptRequest; + + +/** + * Delete Login Ticket + * + * @author davidc + */ +public class LoginTicketDelete extends DeclarativeWebScript +{ + // dependencies + private AuthenticationService authenticationService; + private TicketComponent ticketComponent; + + /** + * @param ticketComponent + */ + public void setTicketComponent(TicketComponent ticketComponent) + { + this.ticketComponent = ticketComponent; + } + + /** + * @param authenticationService + */ + public void setAuthenticationService(AuthenticationService authenticationService) + { + this.authenticationService = authenticationService; + } + + + /* (non-Javadoc) + * @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.WebScriptResponse) + */ + @Override + protected Map executeImpl(WebScriptRequest req, Status status) + { + // retrieve ticket from request and current ticket + String ticket = req.getExtensionPath(); + if (ticket == null || ticket.length() == 0) + { + throw new WebScriptException(HttpServletResponse.SC_BAD_REQUEST, "Ticket not specified"); + } + + // construct model for ticket + Map model = new HashMap(1, 1.0f); + model.put("ticket", ticket); + + try + { + String ticketUser = ticketComponent.validateTicket(ticket); + + // do not go any further if tickets are different + if (!AuthenticationUtil.getFullyAuthenticatedUser().equals(ticketUser)) + { + status.setCode(HttpServletResponse.SC_NOT_FOUND); + status.setMessage("Ticket not found"); + } + else + { + // delete the ticket + authenticationService.invalidateTicket(ticket); + status.setMessage("Deleted Ticket " + ticket); + } + } + catch(AuthenticationException e) + { + status.setCode(HttpServletResponse.SC_NOT_FOUND); + status.setMessage("Ticket not found"); + } + + status.setRedirect(true); + return model; + } + +} diff --git a/source/java/org/alfresco/repo/web/scripts/blogs/posts/AbstractGetBlogWebScript.java b/source/java/org/alfresco/repo/web/scripts/blogs/posts/AbstractGetBlogWebScript.java index 5dfc4b8f07..9bee75b6a8 100644 --- a/source/java/org/alfresco/repo/web/scripts/blogs/posts/AbstractGetBlogWebScript.java +++ b/source/java/org/alfresco/repo/web/scripts/blogs/posts/AbstractGetBlogWebScript.java @@ -82,7 +82,7 @@ public abstract class AbstractGetBlogWebScript extends AbstractBlogWebScript if (this.getClass().equals(BlogPostsNewGet.class)) { // Default is for 'now' minus seven days. - final int oneDayInMilliseconds = 24 * 60 * 60 * 1000; + final long oneDayInMilliseconds = 24 * 60 * 60 * 1000; final long sevenDaysInMilliseconds = 7 * oneDayInMilliseconds; fromDate = new Date(System.currentTimeMillis() - sevenDaysInMilliseconds); @@ -171,7 +171,7 @@ public abstract class AbstractGetBlogWebScript extends AbstractBlogWebScript Date result = null; if (dateStr != null) { - result = new Date(Integer.parseInt(dateStr)); + result = new Date(Long.parseLong(dateStr)); } return result; } diff --git a/source/java/org/alfresco/repo/web/scripts/bulkimport/BulkFilesystemImportStatusWebScript.java b/source/java/org/alfresco/repo/web/scripts/bulkimport/BulkFilesystemImportStatusWebScript.java index 65c50228bb..5984e0e271 100644 --- a/source/java/org/alfresco/repo/web/scripts/bulkimport/BulkFilesystemImportStatusWebScript.java +++ b/source/java/org/alfresco/repo/web/scripts/bulkimport/BulkFilesystemImportStatusWebScript.java @@ -29,6 +29,9 @@ import java.util.HashMap; import java.util.Map; import org.alfresco.repo.bulkimport.BulkFilesystemImporter; +import org.alfresco.service.cmr.admin.RepoUsage.LicenseMode; +import org.alfresco.service.descriptor.DescriptorService; +import org.alfresco.service.license.LicenseDescriptor; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.extensions.webscripts.Cache; @@ -47,16 +50,23 @@ public class BulkFilesystemImportStatusWebScript extends DeclarativeWebScript // Output parameters (for Freemarker) private final static String RESULT_IMPORT_STATUS = "importStatus"; + private final static String IS_ENTERPRISE = "isEnterprise"; // Attributes private BulkFilesystemImporter bulkImporter; + private DescriptorService descriptorService; public void setBulkImporter(BulkFilesystemImporter bulkImporter) { this.bulkImporter = bulkImporter; } + + public void setDescriptorService(DescriptorService descriptorService) + { + this.descriptorService = descriptorService; + } - /** + /** * @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.Status, org.alfresco.web.scripts.Cache) */ @Override @@ -66,6 +76,10 @@ public class BulkFilesystemImportStatusWebScript extends DeclarativeWebScript cache.setNeverCache(true); + LicenseDescriptor licenseDescriptor = descriptorService.getLicenseDescriptor(); + boolean isEnterprise = (licenseDescriptor == null ? false : (licenseDescriptor.getLicenseMode() == LicenseMode.ENTERPRISE)); + + result.put(IS_ENTERPRISE, Boolean.valueOf(isEnterprise)); result.put(RESULT_IMPORT_STATUS, bulkImporter.getStatus()); return(result); diff --git a/source/java/org/alfresco/repo/web/scripts/content/MimetypeDescriptionsGet.java b/source/java/org/alfresco/repo/web/scripts/content/MimetypeDescriptionsGet.java new file mode 100644 index 0000000000..a0f395e9f4 --- /dev/null +++ b/source/java/org/alfresco/repo/web/scripts/content/MimetypeDescriptionsGet.java @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2005-2010 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ +package org.alfresco.repo.web.scripts.content; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.alfresco.service.cmr.repository.MimetypeService; +import org.springframework.extensions.webscripts.Cache; +import org.springframework.extensions.webscripts.DeclarativeWebScript; +import org.springframework.extensions.webscripts.Status; +import org.springframework.extensions.webscripts.WebScriptRequest; + + +/** + * Returns the descriptions of all the mimetypes known to the system. + * This is normally used so that things outside of the repo tier (eg Share) + * can display user-facing descriptions of the mimetypes in the system. + * + * @author Nick Burch + * @since 4.0.1 + */ +public class MimetypeDescriptionsGet extends DeclarativeWebScript +{ + public static final String MODEL_MIMETYPES = "mimetypes"; + public static final String MODEL_DEFAULT_EXTENSIONS = "defaultExtensions"; + public static final String MODEL_OTHER_EXTENSIONS = "otherExtensions"; + + private MimetypeService mimetypeService; + + /** + * Sets the Mimetype Service to be used to get the + * list of mime types + */ + public void setMimetypeService(MimetypeService mimetypeService) { + this.mimetypeService = mimetypeService; + } + + @Override + protected Map executeImpl(WebScriptRequest req, Status status, Cache cache) + { + // Get the mimetypes and their descriptions + Map mimetypes = mimetypeService.getDisplaysByMimetype(); + + // Fetch all the extensions known to the system + Map extensions = mimetypeService.getMimetypesByExtension(); + // And the default extensions + Map defaultExtensions = mimetypeService.getExtensionsByMimetype(); + + // For each mimetype, work out the non-default extensions + Map> otherExtensions = new HashMap>(); + for (String extension : extensions.keySet()) + { + String mimetype = extensions.get(extension); + + // If this isn't the default, record it + if (! extension.equals(defaultExtensions.get(mimetype))) + { + if (! otherExtensions.containsKey(mimetype)) + { + otherExtensions.put(mimetype, new ArrayList()); + } + otherExtensions.get(mimetype).add(extension); + } + } + + // Return the model + Map model = new HashMap(); + model.put(MODEL_MIMETYPES, mimetypes); + model.put(MODEL_DEFAULT_EXTENSIONS, defaultExtensions); + model.put(MODEL_OTHER_EXTENSIONS, otherExtensions); + return model; + } +} \ No newline at end of file diff --git a/source/java/org/alfresco/repo/web/scripts/invite/InviteServiceTest.java b/source/java/org/alfresco/repo/web/scripts/invite/InviteServiceTest.java index 5f857273ca..378e188780 100644 --- a/source/java/org/alfresco/repo/web/scripts/invite/InviteServiceTest.java +++ b/source/java/org/alfresco/repo/web/scripts/invite/InviteServiceTest.java @@ -317,6 +317,9 @@ public class InviteServiceTest extends BaseWebScriptTest siteService.deleteSite(SITE_SHORT_NAME_INVITE_1); siteService.deleteSite(SITE_SHORT_NAME_INVITE_2); siteService.deleteSite(SITE_SHORT_NAME_INVITE_3); + // Sleep to ensure asynchronous invite deletion completes + Thread.sleep(5000); + return null; } }; diff --git a/source/java/org/alfresco/repo/web/scripts/invite/Invites.java b/source/java/org/alfresco/repo/web/scripts/invite/Invites.java index 5064430eb8..78a8cd7493 100644 --- a/source/java/org/alfresco/repo/web/scripts/invite/Invites.java +++ b/source/java/org/alfresco/repo/web/scripts/invite/Invites.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Alfresco Software Limited. + * Copyright (C) 2005-2011 Alfresco Software Limited. * * This file is part of Alfresco * @@ -25,6 +25,8 @@ import java.util.Map; import org.alfresco.repo.invitation.InvitationSearchCriteriaImpl; import org.alfresco.repo.invitation.site.InviteInfo; +import org.alfresco.repo.security.authentication.AuthenticationUtil; +import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork; import org.alfresco.repo.template.TemplateNode; import org.alfresco.service.ServiceRegistry; import org.alfresco.service.cmr.invitation.Invitation; @@ -32,6 +34,8 @@ import org.alfresco.service.cmr.invitation.InvitationSearchCriteria; import org.alfresco.service.cmr.invitation.InvitationService; import org.alfresco.service.cmr.invitation.NominatedInvitation; import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.security.AccessStatus; +import org.alfresco.service.cmr.security.PermissionService; import org.alfresco.service.cmr.security.PersonService; import org.alfresco.service.cmr.site.SiteInfo; import org.alfresco.service.cmr.site.SiteService; @@ -179,7 +183,8 @@ public class Invites extends DeclarativeWebScript if (inviteIdProvided) { NominatedInvitation invitation = (NominatedInvitation)invitationService.getInvitation(inviteId); - inviteInfoList.add(toInviteInfo(invitation)); + Map siteInfoCache = new HashMap(2); + inviteInfoList.add(toInviteInfo(siteInfoCache, invitation)); } else // 'inviteId' has not been provided, so create the query properties from @@ -215,9 +220,11 @@ public class Invites extends DeclarativeWebScript // wf:inviterUserName, wf:inviteeUserName, wf:siteShortName, // and invite id property (from workflow instance id)) // onto model for each invite workflow task returned by the query + Map siteInfoCache = new HashMap( + invitations.size() * 2); for (Invitation invitation : invitations) { - inviteInfoList.add(toInviteInfo((NominatedInvitation)invitation)); + inviteInfoList.add(toInviteInfo(siteInfoCache, (NominatedInvitation) invitation)); } } @@ -230,28 +237,22 @@ public class Invites extends DeclarativeWebScript - private InviteInfo toInviteInfo(NominatedInvitation invitation) + private InviteInfo toInviteInfo(Map siteInfoCache, final NominatedInvitation invitation) { - final PersonService personService = serviceRegistry.getPersonService(); - // get the site info - SiteInfo siteInfo = siteService.getSite(invitation.getResourceName()); + String resourceName = invitation.getResourceName(); + SiteInfo siteInfo = siteInfoCache.get(resourceName); + if (siteInfo == null) + { + siteInfo = siteService.getSite(resourceName); + siteInfoCache.put(resourceName, siteInfo); + } String invitationStatus = InviteInfo.INVITATION_STATUS_PENDING; - NodeRef inviterRef = personService.getPerson(invitation.getInviterUserName()); - TemplateNode inviterPerson = null; - if (inviterRef != null) - { - inviterPerson = new TemplateNode(inviterRef, serviceRegistry, null); - } + TemplateNode inviterPerson = getPersonIfAllowed(invitation.getInviterUserName()); // fetch the person node for the invitee - NodeRef inviteeRef = personService.getPerson(invitation.getInviteeUserName()); - TemplateNode inviteePerson = null; - if (inviteeRef != null) - { - inviteePerson = new TemplateNode(inviteeRef, serviceRegistry, null); - } + TemplateNode inviteePerson = getPersonIfAllowed(invitation.getInviteeUserName()); InviteInfo ret = new InviteInfo(invitationStatus, invitation.getInviterUserName(), @@ -266,4 +267,27 @@ public class Invites extends DeclarativeWebScript return ret; } + + private TemplateNode getPersonIfAllowed(final String userName) + { + final PersonService personService = serviceRegistry.getPersonService(); + NodeRef inviterRef = AuthenticationUtil.runAs(new RunAsWork() + { + public NodeRef doWork() throws Exception + { + if (!personService.personExists(userName)) + { + return null; + } + return personService.getPerson(userName, false); + } + }, AuthenticationUtil.getSystemUserName()); + if (inviterRef != null + && serviceRegistry.getPermissionService().hasPermission(inviterRef, PermissionService.READ_PROPERTIES) + .equals(AccessStatus.ALLOWED)) + { + return new TemplateNode(inviterRef, serviceRegistry, null); + } + return null; + } } diff --git a/source/java/org/alfresco/repo/webdav/GetMethod.java b/source/java/org/alfresco/repo/webdav/GetMethod.java index e155b75e92..89a94efb6b 100644 --- a/source/java/org/alfresco/repo/webdav/GetMethod.java +++ b/source/java/org/alfresco/repo/webdav/GetMethod.java @@ -545,7 +545,7 @@ public class GetMethod extends WebDAVMethod String strRight = strSize.substring(length - 3, length - 2); StringBuilder buffer = new StringBuilder(strLeft); - if (!strRight.equals('0')) + if (!strRight.equals("0")) { buffer.append('.'); buffer.append(strRight); @@ -560,7 +560,7 @@ public class GetMethod extends WebDAVMethod String strRight = strSize.substring(length - 6, length - 5); StringBuilder buffer = new StringBuilder(strLeft); - if (!strRight.equals('0')) + if (!strRight.equals("0")) { buffer.append('.'); buffer.append(strRight); diff --git a/source/java/org/alfresco/repo/webdav/WebDAVHelper.java b/source/java/org/alfresco/repo/webdav/WebDAVHelper.java index 0bff713585..1f1dea12e7 100644 --- a/source/java/org/alfresco/repo/webdav/WebDAVHelper.java +++ b/source/java/org/alfresco/repo/webdav/WebDAVHelper.java @@ -19,7 +19,6 @@ package org.alfresco.repo.webdav; import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -45,6 +44,8 @@ import org.alfresco.service.namespace.NamespaceService; import org.alfresco.util.EqualsHelper; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.springframework.extensions.surf.util.URLDecoder; +import org.springframework.extensions.surf.util.URLEncoder; import org.xml.sax.helpers.AttributesImpl; /** @@ -438,7 +439,7 @@ public class WebDAVHelper } else { - return replace(URLEncoder.encode(s, "UTF-8"), "+", "%20"); + return URLEncoder.encode(s); } } catch (UnsupportedEncodingException err) @@ -447,6 +448,11 @@ public class WebDAVHelper } } + public final static String decodeURL(String s) + { + return URLDecoder.decode(s); + } + /** * Replace one string instance with another within the specified string * @@ -570,21 +576,21 @@ public class WebDAVHelper switch (c) { // reserved - case ';': enc = URLEncoder.encode("" + c, "UTF-8"); break; - case '/': enc = URLEncoder.encode("" + c, "UTF-8"); break; - case '?': enc = URLEncoder.encode("" + c, "UTF-8"); break; - case ':': enc = URLEncoder.encode("" + c, "UTF-8"); break; - case '@': enc = URLEncoder.encode("" + c, "UTF-8"); break; - case '&': enc = URLEncoder.encode("" + c, "UTF-8"); break; - case '=': enc = URLEncoder.encode("" + c, "UTF-8"); break; - case '+': enc = URLEncoder.encode("" + c, "UTF-8"); break; + case ';': enc = URLEncoder.encode(String.valueOf(c)); break; + case '/': enc = URLEncoder.encode(String.valueOf(c)); break; + case '?': enc = URLEncoder.encode(String.valueOf(c)); break; + case ':': enc = URLEncoder.encode(String.valueOf(c)); break; + case '@': enc = URLEncoder.encode(String.valueOf(c)); break; + case '&': enc = URLEncoder.encode(String.valueOf(c)); break; + case '=': enc = URLEncoder.encode(String.valueOf(c)); break; + case '+': enc = URLEncoder.encode(String.valueOf(c)); break; // unsafe - case '\"': enc = URLEncoder.encode("" + c, "UTF-8"); break; - case '#': enc = URLEncoder.encode("" + c, "UTF-8"); break; - case '%': enc = URLEncoder.encode("" + c, "UTF-8"); break; - case '>': enc = URLEncoder.encode("" + c, "UTF-8"); break; - case '<': enc = URLEncoder.encode("" + c, "UTF-8"); break; + case '\"': enc = URLEncoder.encode(String.valueOf(c)); break; + case '#': enc = URLEncoder.encode(String.valueOf(c)); break; + case '%': enc = URLEncoder.encode(String.valueOf(c)); break; + case '>': enc = URLEncoder.encode(String.valueOf(c)); break; + case '<': enc = URLEncoder.encode(String.valueOf(c)); break; default: break; } diff --git a/source/java/org/alfresco/repo/webdav/WebDAVServlet.java b/source/java/org/alfresco/repo/webdav/WebDAVServlet.java index 79ad6e06d8..9a98af6ec2 100644 --- a/source/java/org/alfresco/repo/webdav/WebDAVServlet.java +++ b/source/java/org/alfresco/repo/webdav/WebDAVServlet.java @@ -342,7 +342,8 @@ public class WebDAVServlet extends HttpServlet // Commit the transaction - tx.commit(); + if (tx != null) + tx.commit(); } catch (Exception ex) { diff --git a/source/java/org/alfresco/repo/webservice/Utils.java b/source/java/org/alfresco/repo/webservice/Utils.java index 367fdab74c..b1c9a28cf3 100644 --- a/source/java/org/alfresco/repo/webservice/Utils.java +++ b/source/java/org/alfresco/repo/webservice/Utils.java @@ -20,6 +20,7 @@ package org.alfresco.repo.webservice; import java.io.Serializable; import java.util.ArrayList; +import java.util.Arrays; import java.util.Calendar; import java.util.Collection; import java.util.Date; @@ -146,7 +147,7 @@ public class Utils if (logger.isDebugEnabled() == true) { - logger.debug("Converting multi-valued property '" + propertyName.toString() + "' with values " + values.toString()); + logger.debug("Converting multi-valued property '" + propertyName.toString() + "' with values " + Arrays.toString(values)); } if (values != null)