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:
Brian Remmington
2011-07-20 15:54:43 +00:00
parent e5f7b3a6ee
commit 5a303b71ec
6 changed files with 11 additions and 7 deletions

View File

@@ -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;
}

View File

@@ -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()));

View File

@@ -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);