diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/publishing/channel.post.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/repository/publishing/channels.post.desc.xml
similarity index 90%
rename from config/alfresco/templates/webscripts/org/alfresco/repository/publishing/channel.post.desc.xml
rename to config/alfresco/templates/webscripts/org/alfresco/repository/publishing/channels.post.desc.xml
index 164a6c1599..945da2d805 100644
--- a/config/alfresco/templates/webscripts/org/alfresco/repository/publishing/channel.post.desc.xml
+++ b/config/alfresco/templates/webscripts/org/alfresco/repository/publishing/channels.post.desc.xml
@@ -14,6 +14,7 @@
channelIdthe identifier of the new publishing channel
pollUrl The URL to poll to discover whether the channel has been authorised
authoriseUrl The URL to send the user to in order for them to authorise access to the channel
+ authCallbackUrl The URL to return the channel authorisation details to
]]>
@@ -48,6 +49,7 @@
"channelId": string,
"pollUrl": string,
"authoriseUrl": string
+ "authCallbackUrl": string
}
}
]]>
diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/publishing/channel.post.json.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/publishing/channels.post.json.ftl
similarity index 68%
rename from config/alfresco/templates/webscripts/org/alfresco/repository/publishing/channel.post.json.ftl
rename to config/alfresco/templates/webscripts/org/alfresco/repository/publishing/channels.post.json.ftl
index 5789df16e9..ea6e9e7467 100644
--- a/config/alfresco/templates/webscripts/org/alfresco/repository/publishing/channel.post.json.ftl
+++ b/config/alfresco/templates/webscripts/org/alfresco/repository/publishing/channels.post.json.ftl
@@ -5,7 +5,8 @@
{
"channelId" : "${channelId}",
"pollUrl": "${pollUrl}",
- "authoriseUrl": "${authoriseUrl}"
+ "authoriseUrl": "${authoriseUrl}",
+ "authCallbackUrl": "${authCallbackUrl}"
}
}
#escape>
diff --git a/config/alfresco/web-scripts-application-context.xml b/config/alfresco/web-scripts-application-context.xml
index 2bdd993c7d..460a80d191 100644
--- a/config/alfresco/web-scripts-application-context.xml
+++ b/config/alfresco/web-scripts-application-context.xml
@@ -1126,8 +1126,8 @@
-
diff --git a/source/java/org/alfresco/repo/web/scripts/publishing/ChannelPostWebScript.java b/source/java/org/alfresco/repo/web/scripts/publishing/ChannelsPostWebScript.java
similarity index 94%
rename from source/java/org/alfresco/repo/web/scripts/publishing/ChannelPostWebScript.java
rename to source/java/org/alfresco/repo/web/scripts/publishing/ChannelsPostWebScript.java
index 88515dc766..e8b93a0016 100644
--- a/source/java/org/alfresco/repo/web/scripts/publishing/ChannelPostWebScript.java
+++ b/source/java/org/alfresco/repo/web/scripts/publishing/ChannelsPostWebScript.java
@@ -30,7 +30,7 @@ import org.springframework.extensions.webscripts.DeclarativeWebScript;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;
-public class ChannelPostWebScript extends DeclarativeWebScript
+public class ChannelsPostWebScript extends DeclarativeWebScript
{
private ChannelService channelService;
@@ -76,6 +76,7 @@ public class ChannelPostWebScript extends DeclarativeWebScript
model.put("pollUrl", pollUrl);
model.put("authoriseUrl", authoriseUrl);
model.put("channelId", channelNodeRef.toString());
+ model.put("authCallbackUrl", callbackUrl);
return model;
}
diff --git a/source/java/org/alfresco/repo/web/scripts/publishing/PublishingModelBuilder.java b/source/java/org/alfresco/repo/web/scripts/publishing/PublishingModelBuilder.java
index 9b6a1111d2..3ba3a398ba 100644
--- a/source/java/org/alfresco/repo/web/scripts/publishing/PublishingModelBuilder.java
+++ b/source/java/org/alfresco/repo/web/scripts/publishing/PublishingModelBuilder.java
@@ -146,7 +146,7 @@ public class PublishingModelBuilder
model.put(CHANNEL_NODE_TYPE, type.getChannelNodeType().toString());
model.put(SUPPORTED_CONTENT_TYPES, toListOfStrings(type.getSupportedContentTypes()));
- model.put(SUPPORTED_MIME_TYPES, type.getSupportedMimetypes());
+ model.put(SUPPORTED_MIME_TYPES, type.getSupportedMimeTypes());
model.put(CAN_PUBLISH, toString(type.canPublish()));
model.put(CAN_PUBLISH_STATUS_UPDATES, toString(type.canPublishStatusUpdates()));
diff --git a/source/java/org/alfresco/repo/web/scripts/publishing/PublishingRestApiTest.java b/source/java/org/alfresco/repo/web/scripts/publishing/PublishingRestApiTest.java
index 2c6e041ffe..e850dd7d34 100644
--- a/source/java/org/alfresco/repo/web/scripts/publishing/PublishingRestApiTest.java
+++ b/source/java/org/alfresco/repo/web/scripts/publishing/PublishingRestApiTest.java
@@ -599,7 +599,7 @@ public class PublishingRestApiTest extends BaseWebScriptTest
List contentTypes = CollectionUtils.toListOfStrings(channelType.getSupportedContentTypes());
checkStrings(jsonType.getJSONArray(SUPPORTED_CONTENT_TYPES), contentTypes);
- checkStrings(jsonType.getJSONArray(SUPPORTED_MIME_TYPES), channelType.getSupportedMimetypes());
+ checkStrings(jsonType.getJSONArray(SUPPORTED_MIME_TYPES), channelType.getSupportedMimeTypes());
check(CAN_PUBLISH, jsonType, channelType.canPublish());
check(CAN_PUBLISH_STATUS_UPDATES, jsonType, channelType.canPublishStatusUpdates());
@@ -731,7 +731,7 @@ public class PublishingRestApiTest extends BaseWebScriptTest
ChannelType publishPdf= mockChannelType(publishPdfType);
when(publishPdf.canPublish()).thenReturn(true);
- when(publishPdf.getSupportedMimetypes()).thenReturn(Collections.singleton(MimetypeMap.MIMETYPE_PDF));
+ when(publishPdf.getSupportedMimeTypes()).thenReturn(Collections.singleton(MimetypeMap.MIMETYPE_PDF));
ChannelType statusUpdate= mockChannelType(statusUpdateType);
when(statusUpdate.canPublishStatusUpdates()).thenReturn(true);