Changeset 6155


Ignore:
Timestamp:
05/10/12 11:20:41 (12 years ago)
Author:
asaikawa
Message:

Ticket #2507 - Implementados os recursos para adicionar, remover e renomear pastas

Location:
sandbox/webservice/api
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • sandbox/webservice/api/Errors.php

    r6150 r6155  
    2828         
    2929 
    30         const CATALOG_MIN_ARGUMENT_SEARCH       = "1001";        
    31         const MAIL_NOT_SENT                                     = "1002"; 
    32         const MAIL_TRASH_NOT_CLEANED            = "1003"; 
    33         const MAIL_MESSAGE_NOT_FOUND            = "1004"; 
     30        const CATALOG_MIN_ARGUMENT_SEARCH               = "1001"; 
     31        const MAIL_NOT_SENT                                             = "1002"; 
     32        const MAIL_TRASH_NOT_CLEANED                    = "1003"; 
     33        const MAIL_MESSAGE_NOT_FOUND                    = "1004"; 
     34        const MAIL_INVALID_NEW_FOLDER_NAME              = "1005"; 
     35        const MAIL_INVALID_OLD_FOLDER                   = "1006"; 
     36        const MAIL_INVALID_FOLDER                               = "1007"; 
     37        const MAIL_CANNOT_DEL_DEFAULT_FOLDER    = "1008"; 
     38        const MAIL_FOLDER_NOT_EMPTY                             = "1009"; 
     39        const MAIL_FOLDER_NOT_RENAMED                   = "1010"; 
     40        const MAIL_FOLDER_NOT_ADDED                             = "1011"; 
     41        const MAIL_FOLDER_NOT_DELETED                   = "1012"; 
    3442         
    3543        static private $reservedErrors = array (                         
     
    4755        static private $applicationErrors = array(                       
    4856 
    49                 self::LOGIN_SUCCESS_LOGOUT                      => "You have been successfully logged out", 
    50                 self::LOGIN_SESSION_EXPIRED             => "Sorry, your login has expired", 
    51                 self::LOGIN_NOT_LOGGED_IN                       => "You are not logged in", 
    52                 self::LOGIN_COOKIES_REQUIRED            => "Cookies are required to login to this site.", 
    53                 self::LOGIN_BADLOGIN                            => "bad login or password", 
    54                 self::LOGIN_PASSWORD_EXPIRED            => "Your password has expired, and you do not have access to change it", 
    55                 self::LOGIN_AUTH_INVALID                        => "Your auth is invalid", 
    56                 self::LOGIN_SESSION_NOT_VERIFIED        => "Your session could not be verified.", 
    57                 self::LOGIN_ACCOUNT_EXPIRED             => "Account is expired", 
    58                 self::LOGIN_LOGIN_BLOCKED                       => "Blocked, too many attempts!", 
    59                 self::LOGIN_INVALID_LOGIN                       => "Bad login or password", 
    60                 self::CATALOG_MIN_ARGUMENT_SEARCH       => "Your search argument must be longer than %1 characters.", 
    61                 self::MAIL_NOT_SENT                                     => "Your mail could not be sent.", 
    62                 self::MAIL_TRASH_NOT_CLEANED            => "Your trash folder could not be cleaned.", 
    63                 self::MAIL_MESSAGE_NOT_FOUND            => "Message not found in folder %1." 
     57                self::LOGIN_SUCCESS_LOGOUT                              => "You have been successfully logged out", 
     58                self::LOGIN_SESSION_EXPIRED                             => "Sorry, your login has expired", 
     59                self::LOGIN_NOT_LOGGED_IN                               => "You are not logged in", 
     60                self::LOGIN_COOKIES_REQUIRED                    => "Cookies are required to login to this site.", 
     61                self::LOGIN_BADLOGIN                                    => "bad login or password", 
     62                self::LOGIN_PASSWORD_EXPIRED                    => "Your password has expired, and you do not have access to change it", 
     63                self::LOGIN_AUTH_INVALID                                => "Your auth is invalid", 
     64                self::LOGIN_SESSION_NOT_VERIFIED                => "Your session could not be verified.", 
     65                self::LOGIN_ACCOUNT_EXPIRED                             => "Account is expired", 
     66                self::LOGIN_LOGIN_BLOCKED                               => "Blocked, too many attempts!", 
     67                self::LOGIN_INVALID_LOGIN                               => "Bad login or password", 
     68                self::CATALOG_MIN_ARGUMENT_SEARCH               => "Your search argument must be longer than %1 characters.", 
     69                self::MAIL_NOT_SENT                                             => "Your mail could not be sent.", 
     70                self::MAIL_TRASH_NOT_CLEANED                    => "Your trash folder could not be cleaned.", 
     71                self::MAIL_MESSAGE_NOT_FOUND                    => "Message not found in folder %1.", 
     72                self::MAIL_INVALID_NEW_FOLDER_NAME              => "Invalid folder name.", 
     73                self::MAIL_INVALID_OLD_FOLDER                   => "Invalid old folder.", 
     74                self::MAIL_INVALID_FOLDER                               => "Invalid folder.", 
     75                self::MAIL_CANNOT_DEL_DEFAULT_FOLDER    => "Cannot delete a default folder.", 
     76                self::MAIL_FOLDER_NOT_EMPTY                             => "The folder is not empty.", 
     77                self::MAIL_FOLDER_NOT_RENAMED                   => "The folder could not be renamed.", 
     78                self::MAIL_FOLDER_NOT_ADDED                             => "The folder could not be added.", 
     79                self::MAIL_FOLDER_NOT_DELETED                   => "The folder could not be deleted." 
    6480        ); 
    6581                 
     
    89105                        $error = Errors::get($code);                     
    90106                        $message = ($responseException->getMessage() ? $responseException->getMessage() : $error['message']);                    
    91                         $body['error'] = array("code" => $code, "message" => $message);          
     107                        $body['error'] = array("code" => "$code", "message" => $message);                
    92108                        $response->body = json_encode($body); 
    93109                        return $response; 
  • sandbox/webservice/api/config/Tonic.srv

    r6091 r6155  
    1010[/Mail/Folders] 
    1111FoldersResource = /mail/FoldersResource.php 
     12 
     13[/Mail/RenameFolder] 
     14RenameFolderResource = /mail/RenameFolderResource.php 
     15 
     16[/Mail/AddFolder] 
     17AddFolderResource = /mail/AddFolderResource.php 
     18 
     19[/Mail/DelFolder] 
     20DelFolderResource = /mail/DelFolderResource.php 
    1221 
    1322[/Mail/Messages] 
  • sandbox/webservice/api/rest/dispatch.php

    r6149 r6155  
    1616require_once(__DIR__."/mail/FoldersResource.php"); 
    1717require_once(__DIR__."/mail/MessagesResource.php"); 
     18require_once(__DIR__."/mail/AddFolderResource.php"); 
     19require_once(__DIR__."/mail/DelFolderResource.php"); 
     20require_once(__DIR__."/mail/RenameFolderResource.php"); 
    1821require_once(__DIR__."/mail/CleanTrashResource.php"); 
    1922require_once(__DIR__."/mail/SendSupportFeedbackResource.php"); 
Note: See TracChangeset for help on using the changeset viewer.