mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Publishing:
- channels.post webscript now returns authCallbackUrl in addition to previous data git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29230 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -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;
|
||||
}
|
@@ -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()));
|
||||
|
@@ -599,7 +599,7 @@ public class PublishingRestApiTest extends BaseWebScriptTest
|
||||
|
||||
List<String> 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);
|
||||
|
Reference in New Issue
Block a user