OLD | NEW |
1 /* | 1 /* |
2 * Licensed to the Apache Software Foundation (ASF) under one | 2 * Licensed to the Apache Software Foundation (ASF) under one |
3 * or more contributor license agreements. See the NOTICE file | 3 * or more contributor license agreements. See the NOTICE file |
4 * distributed with this work for additional information | 4 * distributed with this work for additional information |
5 * regarding copyright ownership. The ASF licenses this file | 5 * regarding copyright ownership. The ASF licenses this file |
6 * to you under the Apache License, Version 2.0 (the | 6 * to you under the Apache License, Version 2.0 (the |
7 * "License"); you may not use this file except in compliance | 7 * "License"); you may not use this file except in compliance |
8 * with the License. You may obtain a copy of the License at | 8 * with the License. You may obtain a copy of the License at |
9 * | 9 * |
10 * http://www.apache.org/licenses/LICENSE-2.0 | 10 * http://www.apache.org/licenses/LICENSE-2.0 |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 | 515 |
516 var fields = opensocial.DataRequest.ActivityRequestFields; | 516 var fields = opensocial.DataRequest.ActivityRequestFields; |
517 | 517 |
518 this.addDefaultParam(opt_params, fields.FIRST, 0); | 518 this.addDefaultParam(opt_params, fields.FIRST, 0); |
519 this.addDefaultParam(opt_params, fields.MAX, 20); | 519 this.addDefaultParam(opt_params, fields.MAX, 20); |
520 | 520 |
521 return opensocial.Container.get().newFetchActivitiesRequest(idSpec, | 521 return opensocial.Container.get().newFetchActivitiesRequest(idSpec, |
522 opt_params); | 522 opt_params); |
523 }; | 523 }; |
524 | 524 |
| 525 |
525 /** | 526 /** |
526 * Creats an item to request messages from the container. | 527 * Creats an item to request messages collections from the container.· |
527 * | 528 *· |
| 529 * @param {opensocial.IdSpec} idSpec An IdSpec used to specify which people to |
| 530 * fetch. See also <a href="opensocial.IdSpec.html">IdSpec</a>. |
| 531 * @param opt_params Additional parameters to pass to the request |
| 532 * @return {Object} A request object |
528 */ | 533 */ |
529 opensocial.DataRequest.prototype.newFetchMessageCollectionsRequest = function(id
Spec, opt_params) { | 534 opensocial.DataRequest.prototype.newFetchMessageCollectionsRequest = function(id
Spec, opt_params) { |
530 opt_params = opt_params || {}; | 535 opt_params = opt_params || {}; |
531 return opensocial.Container.get().newFetchMessageCollectionsRequest(idSpec, op
t_params); | 536 return opensocial.Container.get().newFetchMessageCollectionsRequest(idSpec, op
t_params); |
532 }; | 537 }; |
533 | 538 |
| 539 |
| 540 /** |
| 541 * Creats an item to request messages from the container. |
| 542 *· |
| 543 * @param {opensocial.IdSpec} idSpec An IdSpec used to specify which people to |
| 544 * fetch. See also <a href="opensocial.IdSpec.html">IdSpec</a>. |
| 545 * @param opt_params Additional parameters to pass to the request |
| 546 * @return {Object} A request object |
| 547 */ |
534 opensocial.DataRequest.prototype.newFetchMessagesRequest = function(idSpec, msgC
ollId, opt_params) { | 548 opensocial.DataRequest.prototype.newFetchMessagesRequest = function(idSpec, msgC
ollId, opt_params) { |
535 opt_params = opt_params || {}; | 549 opt_params = opt_params || {}; |
536 return opensocial.Container.get().newFetchMessagesRequest(idSpec, msgCollId, o
pt_params); | 550 return opensocial.Container.get().newFetchMessagesRequest(idSpec, msgCollId, o
pt_params); |
537 }; | 551 }; |
| 552 |
| 553 |
| 554 /** |
| 555 * Creates a new message collection on the container and returns the ID of the |
| 556 * item created. |
| 557 *· |
| 558 * @param {opensocial.IdSpec} idSpec An IdSpec used to specify which |
| 559 * people/groups to create the message collection for. See also |
| 560 * <a href="opensocial.IdSpec.html">IdSpec</a>. |
| 561 * @param opt_params Additional parameters to pass to the request |
| 562 * @return {Object} A request object |
| 563 */· |
| 564 opensocial.DataRequest.prototype.newCreateMessageCollectionRequest = function( |
| 565 idSpec, messageCollection) { |
| 566 return opensocial.Container.get().newCreateMessageCollectionRequest(idSpec, |
| 567 messageCollection); |
| 568 }; |
| 569 |
| 570 |
| 571 /** |
| 572 * Updates the message collection. Only the fields TITLE and URLS can be |
| 573 * updated. |
| 574 *· |
| 575 * @param {opensocial.IdSpec} idSpec An IdSpec used to specify which |
| 576 * people/groups own the message collection. |
| 577 * @param {opensocial.MessageCollection} The updated message collection. |
| 578 * @return {Object} A request object···· |
| 579 */ |
| 580 opensocial.DataRequest.prototype.newUpdateMessageCollectionRequest = function( |
| 581 idSpec, messageCollection) { |
| 582 return opensocial.Container.get().newUpdateMessageCollectionRequest(idSpec, |
| 583 messageCollection); |
| 584 }; |
| 585 |
| 586 |
| 587 /** |
| 588 * Deletes the message collection. |
| 589 *· |
| 590 * @param {opensocial.IdSpec} idSpec An IdSpec used to specify which |
| 591 * people/groups own the message collection. |
| 592 * @param {string} The message collection to delete. |
| 593 * @return {Object} A request object |
| 594 */ |
| 595 opensocial.DataRequest.prototype.newDeleteMessageCollectionRequest = function( |
| 596 idSpec, msgCollId) { |
| 597 return opensocial.Container.get().newDeleteMessageCollectionRequest(idSpec, |
| 598 msgCollId); |
| 599 }; |
| 600 |
| 601 |
| 602 /** |
| 603 * Updates the message. The fields: APP_URL, ID and SENDER_ID can't be |
| 604 * updated. Container may define whether other fields can be updated or not. |
| 605 *· |
| 606 * @param {opensocial.IdSpec} idSpec An IdSpec used to specify which |
| 607 * people/groups own the message collection. |
| 608 * @param {opensocial.Message} The updated message. |
| 609 * @return {Object} A request object |
| 610 */ |
| 611 opensocial.DataRequest.prototype.newUpdateMessageRequest = function(idSpec, |
| 612 msgCollId, message) { |
| 613 return opensocial.Container.get().newUpdateMessageRequest(idSpec, msgCollId, |
| 614 message); |
| 615 }; |
| 616 |
| 617 |
| 618 /** |
| 619 * Deletes the message. |
| 620 *· |
| 621 * @param {opensocial.IdSpec} idSpec An IdSpec used to specify which |
| 622 * people/groups own the message collection. |
| 623 * @param {string} The message collection to delete from. |
| 624 * @param {string} The message to delete. |
| 625 * @return {Object} A request object |
| 626 */ |
| 627 opensocial.DataRequest.prototype.newDeleteMessageRequest = function(idSpec, |
| 628 msgCollId, msgId) { |
| 629 return opensocial.Container.get().newDeleteMessageRequest(idSpec, msgCollId, m
sgId); |
| 630 }; |
OLD | NEW |