Package org.eurekastreams.server.action.request.opensocial

Examples of org.eurekastreams.server.action.request.opensocial.DeleteAppDataRequest


     */
    @Test
    public final void testExeuctionWithWildCardKey() throws Exception
    {
        // Set up the call parameters
        DeleteAppDataRequest currentRequest = new DeleteAppDataRequest(testApplicationId, testOpenSocialId,
                testAppDataStar);

        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);

        context.checking(new Expectations()
View Full Code Here


     */
    @Test
    public final void testExeuctionWithThreeOfFourKeys() throws Exception
    {
        // Set up the call parameters
        DeleteAppDataRequest currentRequest = new DeleteAppDataRequest(testApplicationId, testOpenSocialId,
                testAppDataThreeOfFourKeys);

        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);

        context.checking(new Expectations()
View Full Code Here

     */
    @Test(expected = ExecutionException.class)
    public final void testExeuctionWithException()
    {
        // Set up the call parameters
        DeleteAppDataRequest currentRequest = new DeleteAppDataRequest(testApplicationId, testOpenSocialId,
                testAppDataThreeOfFourKeys);

        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);

        context.checking(new Expectations()
View Full Code Here

     */
    @Override
    public Integer execute(final PrincipalActionContext inActionContext) throws ExecutionException
    {
        // get the request
        DeleteAppDataRequest inRequest = (DeleteAppDataRequest) inActionContext.getParams();

        long applicationId = inRequest.getApplicationId();
        String openSocialId = inRequest.getOpenSocialId();

        Map<String, String> currentAppDataValues;

        try
        {
            AppData currentAppData = mapper.findOrCreateByPersonAndGadgetDefinitionIds(applicationId, openSocialId);
            if (currentAppData != null)
            {
                currentAppDataValues = new HashMap<String, String>(currentAppData.getValues());

                Iterator<String> appDataValueKeysIterator = inRequest.getAppDataValueKeys().iterator();

                while (appDataValueKeysIterator.hasNext())
                {
                    final String appDataValueKey = appDataValueKeysIterator.next();
                    // This is an implementation of the OpenSocial Spec 5.3.12.2.11
View Full Code Here

        try
        {
            String userOpenSocialId = userId.getUserId(token);

            // create the request
            DeleteAppDataRequest params = new DeleteAppDataRequest(Long.parseLong(appId), userOpenSocialId, fields);

            // create the context
            ServiceActionContext context = new ServiceActionContext(params,
                    openSocialPrincipalDao.execute(userOpenSocialId));
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.opensocial.DeleteAppDataRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.