Publishing:

- Flickr support for publish and unpublish

Fix ALF-9425: xml-apis.jar duplicates some classes from core JDK 1.6



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29216 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Brian Remmington
2011-07-20 11:35:27 +00:00
parent feb32d5a4c
commit 9ac2599e9d
20 changed files with 636 additions and 94 deletions

View File

@@ -47,7 +47,6 @@ import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.BaseSpringTest;
import org.alfresco.util.GUID;
import org.apache.commons.fileupload.MultipartStream;
import org.junit.Assert;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
@@ -129,7 +128,6 @@ public class FlickrTest extends BaseSpringTest
return contentNode;
}
});
MultipartStream stream = new MultipartStream(null, null);
transactionHelper.doInTransaction(new RetryingTransactionCallback<NodeRef>()
{
public NodeRef execute() throws Throwable
@@ -139,20 +137,21 @@ public class FlickrTest extends BaseSpringTest
actionService.executeAction(publishAction, contentNode);
Map<QName, Serializable> props = nodeService.getProperties(contentNode);
Assert.assertTrue(nodeService.hasAspect(contentNode, FlickrPublishingModel.ASPECT_ASSET));
Assert.assertNotNull(props.get(FlickrPublishingModel.PROP_ASSET_ID));
Assert.assertNotNull(props.get(PublishingModel.PROP_ASSET_ID));
Assert.assertNotNull(props.get(PublishingModel.PROP_ASSET_URL));
System.out.println("Asset id: " + props.get(FlickrPublishingModel.PROP_ASSET_ID));
System.out.println("Asset id: " + props.get(PublishingModel.PROP_ASSET_ID));
System.out.println("Asset URL: " + props.get(PublishingModel.PROP_ASSET_URL));
// Action unpublishAction = actionService.createAction(YouTubeUnpublishAction.NAME);
// actionService.executeAction(unpublishAction, contentNode);
// props = nodeService.getProperties(contentNode);
// Assert.assertFalse(nodeService.hasAspect(contentNode, YouTubePublishingModel.ASPECT_ASSET));
// Assert.assertNull(props.get(YouTubePublishingModel.PROP_ASSET_ID));
// Assert.assertNull(props.get(YouTubePublishingModel.PROP_PLAYER_URL));
Action unpublishAction = actionService.createAction(FlickrUnpublishAction.NAME);
actionService.executeAction(unpublishAction, contentNode);
props = nodeService.getProperties(contentNode);
Assert.assertFalse(nodeService.hasAspect(contentNode, FlickrPublishingModel.ASPECT_ASSET));
Assert.assertFalse(nodeService.hasAspect(contentNode, PublishingModel.ASPECT_ASSET));
Assert.assertNull(props.get(PublishingModel.PROP_ASSET_ID));
Assert.assertNull(props.get(PublishingModel.PROP_ASSET_URL));
return null;
}
});
}
}