├── .gitignore ├── LICENSE ├── README.md ├── autoload.dist.php ├── composer.json ├── docs ├── assets │ └── report_execution_flowchart.png ├── code │ ├── add_attributes.txt │ ├── binary_resource.txt │ ├── calendar_create.txt │ ├── calendar_delete.txt │ ├── calendar_details.txt │ ├── calendar_get.txt │ ├── calendar_objects.txt │ ├── client_invokation.txt │ ├── client_timeout.txt │ ├── composite_resource.txt │ ├── copy_resource.txt │ ├── create_binary_resource.txt │ ├── create_job.txt │ ├── create_organization.txt │ ├── create_permissions.txt │ ├── create_resource.txt │ ├── create_role.txt │ ├── create_user.txt │ ├── delete_attributes.txt │ ├── delete_job.txt │ ├── delete_options.txt │ ├── delete_organization.txt │ ├── delete_permissions.txt │ ├── delete_resource.txt │ ├── delete_role.txt │ ├── delete_user.txt │ ├── destroy_session.txt │ ├── domain_metadata.txt │ ├── download_report.txt │ ├── execute_query.txt │ ├── execution_cancel.txt │ ├── execution_details.txt │ ├── execution_parameter.txt │ ├── execution_run.txt │ ├── execution_search.txt │ ├── execution_search_criteria.txt │ ├── execution_status.txt │ ├── execution_update.txt │ ├── executions_request.txt │ ├── export_execution.txt │ ├── export_execution_attachment.txt │ ├── export_execution_resource.txt │ ├── export_execution_status.txt │ ├── export_service.txt │ ├── get_attributes.txt │ ├── get_input_control_structure.txt │ ├── get_input_control_values.txt │ ├── get_input_controls.txt │ ├── get_job.txt │ ├── get_many_roles.txt │ ├── get_options.txt │ ├── get_organization.txt │ ├── get_repository.txt │ ├── get_role.txt │ ├── import_service.txt │ ├── logcollector_create.txt │ ├── logcollector_delete.txt │ ├── logcollector_download.txt │ ├── logcollector_state.txt │ ├── logcollector_stopall.txt │ ├── logcollector_update.txt │ ├── move_resource.txt │ ├── pause_job.txt │ ├── reorder_input_controls.txt │ ├── resume_job.txt │ ├── run_report_html.txt │ ├── run_report_ic.txt │ ├── search_jobs.txt │ ├── search_organization.txt │ ├── search_permissions.txt │ ├── search_user.txt │ ├── server_info.txt │ ├── service_access.txt │ ├── thumbnail_jpeg.txt │ ├── thumbnail_string.txt │ ├── thumbnails_get.txt │ ├── update_attributes.txt │ ├── update_input_control_structure.txt │ ├── update_input_control_values.txt │ ├── update_job.txt │ ├── update_options.txt │ ├── update_organization.txt │ ├── update_permission.txt │ ├── update_permissions.txt │ ├── update_role.txt │ └── update_user.txt ├── highlight │ ├── AUTHORS.en.txt │ ├── LICENSE │ ├── README.md │ ├── README.ru.md │ ├── classref.txt │ ├── highlight.pack.js │ └── styles │ │ ├── arta.css │ │ ├── ascetic.css │ │ ├── brown_paper.css │ │ ├── brown_papersq.png │ │ ├── dark.css │ │ ├── default.css │ │ ├── far.css │ │ ├── github.css │ │ ├── googlecode.css │ │ ├── idea.css │ │ ├── ir_black.css │ │ ├── magula.css │ │ ├── monokai.css │ │ ├── pojoaque.css │ │ ├── pojoaque.jpg │ │ ├── school_book.css │ │ ├── school_book.png │ │ ├── solarized_dark.css │ │ ├── solarized_light.css │ │ ├── sunburst.css │ │ ├── vs.css │ │ ├── xcode.css │ │ └── zenburn.css ├── index.php └── index_static.html ├── phpunit.xml ├── src └── Jaspersoft │ ├── Client │ └── Client.php │ ├── Dto │ ├── Attribute │ │ └── Attribute.php │ ├── DTOObject.php │ ├── Diagnostic │ │ ├── LogCollectorFilter.php │ │ ├── LogCollectorFilterResource.php │ │ └── LogCollectorSettings.php │ ├── Domain │ │ ├── AbstractMetaEntity.php │ │ ├── MetaData.php │ │ ├── MetaItem.php │ │ └── MetaLevel.php │ ├── ImportExport │ │ ├── ExportTask.php │ │ ├── ImportTask.php │ │ └── TaskState.php │ ├── Job │ │ ├── Alert.php │ │ ├── Calendar │ │ │ ├── AnnualCalendar.php │ │ │ ├── BaseCalendar.php │ │ │ ├── CronCalendar.php │ │ │ ├── DailyCalendar.php │ │ │ ├── DatedCalendar.php │ │ │ ├── FlaggedCalendar.php │ │ │ ├── HolidayCalendar.php │ │ │ ├── MonthlyCalendar.php │ │ │ └── WeeklyCalendar.php │ │ ├── CalendarTrigger.php │ │ ├── Job.php │ │ ├── JobState.php │ │ ├── JobSummary.php │ │ ├── MailNotification.php │ │ ├── OutputFTPInfo.php │ │ ├── RepositoryDestination.php │ │ ├── SimpleTrigger.php │ │ ├── Source.php │ │ └── Trigger.php │ ├── Options │ │ └── ReportOptions.php │ ├── Organization │ │ └── Organization.php │ ├── Permission │ │ └── RepositoryPermission.php │ ├── Report │ │ ├── InputControl.php │ │ └── InputControls │ │ │ ├── InputControl.php │ │ │ └── InputControlState.php │ ├── ReportExecution │ │ ├── Attachment.php │ │ ├── BinaryOutputResource.php │ │ ├── ErrorDescriptor.php │ │ ├── Export │ │ │ ├── Export.php │ │ │ ├── ExportExecution.php │ │ │ └── Request.php │ │ ├── Options.php │ │ ├── OutputResource.php │ │ ├── Parameter.php │ │ ├── ReportExecution.php │ │ ├── Request.php │ │ └── Status.php │ ├── Resource │ │ ├── AdhocDataView.php │ │ ├── AwsDataSource.php │ │ ├── BeanDataSource.php │ │ ├── CollectiveResource.php │ │ ├── CompositeResource.php │ │ ├── CustomDataSource.php │ │ ├── Dashboard.php │ │ ├── DataType.php │ │ ├── DomainTopic.php │ │ ├── File.php │ │ ├── Folder.php │ │ ├── InputControl.php │ │ ├── JdbcDataSource.php │ │ ├── JndiJdbcDataSource.php │ │ ├── ListOfValues.php │ │ ├── MondrianConnection.php │ │ ├── MondrianXmlaDefinition.php │ │ ├── OlapUnit.php │ │ ├── Query.php │ │ ├── ReportOptions.php │ │ ├── ReportUnit.php │ │ ├── Resource.php │ │ ├── ResourceLookup.php │ │ ├── SecureMondrianConnection.php │ │ ├── SemanticLayerDataSource.php │ │ ├── VirtualDataSource.php │ │ └── XmlaConnection.php │ ├── Role │ │ └── Role.php │ ├── Thumbnail │ │ └── ResourceThumbnail.php │ └── User │ │ ├── User.php │ │ └── UserLookup.php │ ├── Exception │ ├── DtoException.php │ ├── MissingValueException.php │ ├── RESTRequestException.php │ ├── ReportExecutionException.php │ └── ResourceServiceException.php │ ├── Service │ ├── Criteria │ │ ├── Criterion.php │ │ ├── ReportExecutionSearchCriteria.php │ │ └── RepositorySearchCriteria.php │ ├── DomainService.php │ ├── ImportExportService.php │ ├── JRSService.php │ ├── JobService.php │ ├── LogCollectorService.php │ ├── OptionsService.php │ ├── OrganizationService.php │ ├── PermissionService.php │ ├── QueryService.php │ ├── ReportExecutionService.php │ ├── ReportService.php │ ├── RepositoryService.php │ ├── Result │ │ └── SearchResourcesResult.php │ ├── RoleService.php │ ├── ServerService.php │ ├── ThumbnailService.php │ └── UserService.php │ └── Tool │ ├── CompositeDTOMapper.php │ ├── DTOMapper.php │ ├── MimeMapper.php │ ├── RESTRequest.php │ ├── TestUtils.php │ └── Util.php └── tests ├── AttributeServiceTest.php ├── BaseTest.php ├── ImportExportServiceTest.php ├── JobsServiceTest.php ├── OrganizationServiceTest.php ├── PermissionServiceTest.php ├── QueryExecutorTest.php ├── ReportOptionsTest.php ├── ReportServiceTest.php ├── RepositoryServiceTest.php ├── RoleServiceTest.php ├── ServerInfoTest.php ├── UserServiceTest.php ├── resources ├── jasperadmin_import.zip └── pitbull.jpg └── test.properties /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | scrap 3 | /vendor/ 4 | composer.lock 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PHP REST Client for JasperReports Server 2 | ======================================= 3 | 4 | Introduction 5 | ------------- 6 | Using this library you can make requests and interact with the Jasper Reports Server through the REST API in native PHP. This allows you to more easily embed data from your report server, or perform administrative tasks on the server using PHP. 7 | 8 | Requirements 9 | ------------- 10 | To use this client, you will need: 11 | - JasperReports Server (version >= 5.2) 12 | - PHP (version >= 5.3, with cURL extension) 13 | - Composer dependency manager (Optional, but recommended) 14 | 15 | 16 | Installation 17 | ------------- 18 | Add the following to your composer.json file for your project, or run `php composer.phar reqiure jaspersoft/rest-client v2.0.0` in the directory of your project 19 | 20 | { 21 | "require": { 22 | "jaspersoft/rest-client": "v2.0.0" 23 | } 24 | } 25 | 26 | Or alternatively, download this package from github, and run `php composer.phar install` in the directory containing composer.json to generate the autoloader, then require the autoloader using 27 | 28 | require_once "vendor/autoload.php" 29 | 30 | Additionally, a distributed autoloader is included if oyu want to simply include it in an existing project, or do not want to bother with Composer. 31 | 32 | require_once "autoload.dist.php" 33 | 34 | Online Documentation 35 | -------------------- 36 | Preview the [documentation online] (http://community.jaspersoft.com/wiki/php-client-sample-code) at the Jaspersoft Community website. 37 | 38 | Security Notice 39 | ---------------- 40 | This package uses BASIC authentication to identify itself with the server. This package should only be used over a trusted connection between your report server and your web server. 41 | 42 | PHPUnits 43 | -------- 44 | The tests contained in this package are integration tests and are _not intended to be ran on a production server!_ 45 | 46 | License 47 | -------- 48 | Copyright © 2005 - 2014 Jaspersoft Corporation. All rights reserved. 49 | http://www.jaspersoft.com. 50 | 51 | Unless you have purchased a commercial license agreement from Jaspersoft, 52 | the following license terms apply: 53 | 54 | This program is free software: you can redistribute it and/or modify 55 | it under the terms of the GNU Lesser General Public License as 56 | published by the Free Software Foundation, either version 3 of the 57 | License, or (at your option) any later version. 58 | 59 | This program is distributed in the hope that it will be useful, 60 | but WITHOUT ANY WARRANTY; without even the implied warranty of 61 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 62 | GNU Lesser General Public License for more details. 63 | 64 | You should have received a copy of the GNU Lesser General Public License 65 | along with this program. If not, see . 66 | -------------------------------------------------------------------------------- /autoload.dist.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jaspersoft/rest-client", 3 | "description": "A client for the JasperReports Server REST API", 4 | "license": "LGPL-3.0", 5 | "authors": [ 6 | { 7 | "name": "Jaspersoft", 8 | "email": "code@jaspersoft.com" 9 | } 10 | ], 11 | "homepage": "http://github.com/Jaspersoft/jrs-rest-php-client", 12 | "keywords": ["jasperreports","jaspersoft", "jasper-reports", "reporting"], 13 | "require": { 14 | "php": ">=5.3.0", 15 | "ext-curl": "*" 16 | }, 17 | "autoload": { 18 | "psr-0": { 19 | "Jaspersoft": "src/" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /docs/assets/report_execution_flowchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jaspersoft/jrs-rest-php-client/32dc45485030c6339e636c309cd5280af6479bf4/docs/assets/report_execution_flowchart.png -------------------------------------------------------------------------------- /docs/code/add_attributes.txt: -------------------------------------------------------------------------------- 1 | $CAuser = $c->userService()->getUser("CaliforniaUser", "organization_1"); 2 | 3 | $animal_attr = new Attribute("Favorite Animal", "Bear"); 4 | $c->userService()->addOrUpdateAttribute($CAuser, $animal_attr); -------------------------------------------------------------------------------- /docs/code/binary_resource.txt: -------------------------------------------------------------------------------- 1 | $image = $c->repositoryService()->getResource("/ImageFolder/logo"); 2 | $image_data = $c->repositoryService()->getBinaryFileData($image); 3 | 4 | echo "

Example Corporation

"; -------------------------------------------------------------------------------- /docs/code/calendar_create.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | $noMWS = new WeeklyCalendar(); 4 | $noMWS->addExcludeDays(array( 5 | WeeklyCalendar::MONDAY, 6 | WeeklyCalendar::WEDNESDAY, 7 | WeeklyCalendar::SUNDAY)); 8 | 9 | $c->jobService()->createOrUpdateCalendar($noMWS, "MON_WED_SUN"); -------------------------------------------------------------------------------- /docs/code/calendar_delete.txt: -------------------------------------------------------------------------------- 1 | 2 | $c->jobService()->deleteCalendar("MON_WED_SUN"); -------------------------------------------------------------------------------- /docs/code/calendar_details.txt: -------------------------------------------------------------------------------- 1 | 2 | $newYears = $c->jobService()->getCalendar("NEW_YEARS_CALENDAR"); 3 | -------------------------------------------------------------------------------- /docs/code/calendar_get.txt: -------------------------------------------------------------------------------- 1 | 2 | $calendars = $c->jobService()->getCalendarNames(); //all defined calendars 3 | $annual_calendars = $c->jobService()->getCalendarNames("annual"); // only annual calendars -------------------------------------------------------------------------------- /docs/code/calendar_objects.txt: -------------------------------------------------------------------------------- 1 | 2 | use Jaspersoft\Dto\Job\Calendar\WeeklyCalendar; 3 | use Jaspersoft\Dto\Job\Calendar\HolidayCalendar; 4 | 5 | $noMWS = new WeeklyCalendar(); 6 | $noMWS->addExcludeDays(array( 7 | WeeklyCalendar::MONDAY, 8 | WeeklyCalendar::WEDNESDAY, 9 | WeeklyCalendar::SUNDAY)); 10 | 11 | $noNewYears = new HolidayCalendar(); 12 | $noNewYears->addExcludeDate("2015-01-01"); 13 | 14 | -------------------------------------------------------------------------------- /docs/code/client_invokation.txt: -------------------------------------------------------------------------------- 1 | require_once __DIR__ . "/vendor/autoload.php"; 2 | 3 | use Jaspersoft\Client\Client; 4 | 5 | $c = new Client( 6 | "http://localhost:8080/jasperserver-pro", 7 | "jasperadmin", 8 | "jasperadmin", 9 | "organization_1" 10 | ); -------------------------------------------------------------------------------- /docs/code/client_timeout.txt: -------------------------------------------------------------------------------- 1 | // Let the client wait one whole minute before timing out 2 | $c->setRequestTimeout(60); -------------------------------------------------------------------------------- /docs/code/composite_resource.txt: -------------------------------------------------------------------------------- 1 | $report_shop = new \Jaspersoft\DTO\Resource\ReportUnit(); 2 | $city_control = new \Jaspersoft\DTO\Resource\InputControl(); 3 | 4 | $city_control->query = "/queries/cityQuery"; 5 | $city_control->label = "city"; 6 | $city_control->type = 7; 7 | $city_control->visible = true; 8 | $city_control->visibleColumns = ["city", "country", "zipcode"]; 9 | $city_control->valueColumn = "city"; 10 | 11 | $report_shop->label = "All Accounts Report of Shops"; 12 | $report_shop->description = "AllAccounts style report derived from the shops JDBC datasource"; 13 | $report_shop->uri = "/my_reports/allaccount_shop"; 14 | $report_shop->dataSource = "/datasources/shopJDBC"; 15 | $report_shop->inputControls = array( 16 | "/inputcontrols/age", 17 | "/inputcontrols/state", 18 | $city_control); 19 | 20 | $report_shop->query = "/queries/shop_accounts"; 21 | $report_shop->jrxml = "/jrxml/allaccounts"; 22 | -------------------------------------------------------------------------------- /docs/code/copy_resource.txt: -------------------------------------------------------------------------------- 1 | $c->repositoryService()->copyResource("/MyReports/ImageFolder", "/SharedReports", true); -------------------------------------------------------------------------------- /docs/code/create_binary_resource.txt: -------------------------------------------------------------------------------- 1 | $file = new File; 2 | 3 | $file->description = "JPG of company logo"; 4 | $file->label = "logo"; 5 | 6 | $c->repositoryService()->createFileResource( 7 | $file, 8 | file_get_contents("/home/user/logo.jpg"), 9 | "/ImageFolder", 10 | ); 11 | 12 | -------------------------------------------------------------------------------- /docs/code/create_job.txt: -------------------------------------------------------------------------------- 1 | // SimpleTrigger 2 | $trigger = new SimpleTrigger(); 3 | $trigger->timezone = "America/Los_Angeles"; 4 | $trigger->startType = 2; 5 | $trigger->startDate = "2025-10-26 10:00"; 6 | $trigger->occurrenceCount = 1; 7 | 8 | // Source 9 | $source = new Source(); 10 | $source->reportUnitURI = "/adhoc/topics/Cascading_multi_select_topic"; 11 | $source->parameters = array("Country_multi_select" => array("Mexico"), 12 | "Country_name_single_select" => array("Chin-Lovell Engineering Associates"), 13 | "Country_state_multi_select" => array("DF", "Jalisco", "Mexico")); 14 | 15 | // Repository Destination 16 | $repoDest = new RepositoryDestination(); 17 | $repoDest->folderURI = $f->uri; 18 | 19 | $job = new Job("Sample Job Name", $trigger, $source, "Cascading_multi_select_test", 20 | array("PDF", "XLS"), $repoDest); 21 | $job->description = "Sample Description"; 22 | 23 | try { 24 | $c->jobService()->createJob($job); 25 | } catch (\Exception e) { 26 | printf('Caught Exception: %s', $e->getMessage()); 27 | } -------------------------------------------------------------------------------- /docs/code/create_organization.txt: -------------------------------------------------------------------------------- 1 | $new_organization = new Organization( 2 | 'test_organization', // alias 3 | 'test_organization', // id 4 | 'organization_1', // parent organization 5 | 'Test Organization'); // organization name 6 | 7 | try { 8 | $c->organizationService()->createOrganization($new_organization); 9 | } catch (Exception $e) { 10 | printf('Creating organization failed: %s', $e->getMessage()); 11 | } -------------------------------------------------------------------------------- /docs/code/create_permissions.txt: -------------------------------------------------------------------------------- 1 | $p = new RepositoryPermission("/reports/samples/AllAccounts", "user:/organization_1/joeuser", 1); 2 | $p2 = new RepositoryPermission("/reports/samples/AllAccounts", "user:/organization_1/janeuser", 32); 3 | $c->permissionService()->createRepositoryPermissions(array($p, $p2)); 4 | 5 | // Likewise, you can create a single permission using the non-plural version 6 | 7 | $c->permissionService()->createRepositoryPermission($p); -------------------------------------------------------------------------------- /docs/code/create_resource.txt: -------------------------------------------------------------------------------- 1 | $folder = new Folder; 2 | 3 | $folder->label = "ImageFolder"; 4 | $folder->description = "A folder for storing images"; 5 | 6 | $c->repositoryService()->createResource($folder, "/"); 7 | -------------------------------------------------------------------------------- /docs/code/create_role.txt: -------------------------------------------------------------------------------- 1 | $robot_role = new Role("ROLE_ROBOT", "organization_1"); 2 | $c->roleService()->createRole($robot_role); -------------------------------------------------------------------------------- /docs/code/create_user.txt: -------------------------------------------------------------------------------- 1 | $newUser = new User( 2 | 'BI_User', 3 | 'superSTRENGTHpassw0rd', 4 | 'clever@email.com', 5 | 'Business Intelligence User', 6 | 'organization_1', 7 | 'true' 8 | ); 9 | 10 | $role = new Role('ROLE_USER', null, 'false'); 11 | $newUser->addRole($role); 12 | 13 | try { 14 | $c->userService()->addOrUpdateUser($newUser); 15 | } catch (Exception $e) { 16 | printf('Could not add new user: %s', $e->getMessage()); 17 | } -------------------------------------------------------------------------------- /docs/code/delete_attributes.txt: -------------------------------------------------------------------------------- 1 | $joeUser = $c->userService()->getUser("joeuser", "organization_1"); 2 | $c->userService()->deleteAttributes($joeUser); -------------------------------------------------------------------------------- /docs/code/delete_job.txt: -------------------------------------------------------------------------------- 1 | $c->jobService()->deleteJob('90210'); -------------------------------------------------------------------------------- /docs/code/delete_options.txt: -------------------------------------------------------------------------------- 1 | try { 2 | $c->optionsService()->deleteReportOptions('/reports/samples/Cascading_multi_select_report', 'CanadaUSA'); 3 | } catch (Exception $e) { 4 | printf("An exception was thrown: ", $e->getMessage()); 5 | } -------------------------------------------------------------------------------- /docs/code/delete_organization.txt: -------------------------------------------------------------------------------- 1 | $search = $c->organizationService()->searchOrganizations('test_organization'); 2 | $organization = $search[0]; 3 | 4 | try { 5 | $c->organizationService->deleteOrganization($organization); 6 | } catch (Exception $e) { 7 | printf('Organization deletion failure: %s', $e->getMessage()); 8 | } -------------------------------------------------------------------------------- /docs/code/delete_permissions.txt: -------------------------------------------------------------------------------- 1 | $p = $c->permissionService()->searchRepositoryPermissions("/reports/samples/AllACcounts", null, null, "user:/organization_1/joeuser"); 2 | $c->permissionService()->deleteRepositoryPermission($p[0]); -------------------------------------------------------------------------------- /docs/code/delete_resource.txt: -------------------------------------------------------------------------------- 1 | $c->repositoryService()->deleteResources("/ImageFolder/logo"); 2 | $c->repositoryService()->deleteResources("/ImageFolder/logo2"); 3 | 4 | // or 5 | 6 | $c->repositoryService()->deleteResources(array("/ImageFolder/logo", "/ImageFolder/logo2")); 7 | -------------------------------------------------------------------------------- /docs/code/delete_role.txt: -------------------------------------------------------------------------------- 1 | $role_human = $c->roleService()->getRole("ROLE_HUMAN", "organization_1"); 2 | $c->roleService()->deleteRole($role_human); -------------------------------------------------------------------------------- /docs/code/delete_user.txt: -------------------------------------------------------------------------------- 1 | $user = $c->userService()->getUserByLookup( 2 | $c->userService()->searchUsers('jane', 'organization_1')[0] 3 | ); 4 | 5 | $c->userService()->deleteUser($user); -------------------------------------------------------------------------------- /docs/code/destroy_session.txt: -------------------------------------------------------------------------------- 1 | 2 | $c->logoutSession(); -------------------------------------------------------------------------------- /docs/code/domain_metadata.txt: -------------------------------------------------------------------------------- 1 | 2 | $metadata = $c->domainService()->getMetadata("/Domains/supermartDomain"); 3 | -------------------------------------------------------------------------------- /docs/code/download_report.txt: -------------------------------------------------------------------------------- 1 | $report = $c->reportService()->runReport('/reports/samples/AllAccounts', 'pdf'); 2 | 3 | header('Cache-Control: must-revalidate'); 4 | header('Pragma: public'); 5 | header('Content-Description: File Transfer'); 6 | header('Content-Disposition: attachment; filename=report.pdf'); 7 | header('Content-Transfer-Encoding: binary'); 8 | header('Content-Length: ' . strlen($report)); 9 | header('Content-Type: application/pdf'); 10 | 11 | echo $report; -------------------------------------------------------------------------------- /docs/code/execute_query.txt: -------------------------------------------------------------------------------- 1 | $query = << 3 | 4 | 5 | 6 | 7 | 8 | EOF; 9 | 10 | $result = $c->queryService()->executeQuery('/Domains/Simple_Domain', $query); 11 | 12 | print_r($result); -------------------------------------------------------------------------------- /docs/code/execution_cancel.txt: -------------------------------------------------------------------------------- 1 | 2 | $success = $c->reportExecutionService()->cancelReportExecution($executionDetails->requestId); 3 | if ($success instanceof Status) { 4 | echo "Execution cancelled successfully"; 5 | } -------------------------------------------------------------------------------- /docs/code/execution_details.txt: -------------------------------------------------------------------------------- 1 | 2 | $executionDetails = $this->reportExecutionService()->getReportExecutionDetails($executionData->requestId); -------------------------------------------------------------------------------- /docs/code/execution_parameter.txt: -------------------------------------------------------------------------------- 1 | 2 | $p1 = new \Jaspersoft\Dto\ReportExecution\Parameter(); 3 | $p1->name = "ProductFamily"; 4 | $p1->value = array("Food", "Drink"); 5 | 6 | $p2 = new \Jaspersoft\Dto\ReportExecution\Parameter(); 7 | $p2->name = "City"; 8 | $p2->vaule = "D.F."; 9 | 10 | $request->parameters = array($p1, $p2); -------------------------------------------------------------------------------- /docs/code/execution_run.txt: -------------------------------------------------------------------------------- 1 | 2 | $executionData = $c->reportExecutionService()->runReportExecution($request); -------------------------------------------------------------------------------- /docs/code/execution_search.txt: -------------------------------------------------------------------------------- 1 | 2 | $searchResults = $c->reportExecutionService()->searchReportExecutions($criteria); -------------------------------------------------------------------------------- /docs/code/execution_search_criteria.txt: -------------------------------------------------------------------------------- 1 | 2 | $criteria = new \Jaspersoft\Service\Criteria\ReportExecutionSearchCriteria(); 3 | $criteria->jobLabel = "Weekly Report"; -------------------------------------------------------------------------------- /docs/code/execution_status.txt: -------------------------------------------------------------------------------- 1 | 2 | $executionStatus = $c->reportExecutionService()->getReportExecutionStatus($executionData->requestId); -------------------------------------------------------------------------------- /docs/code/execution_update.txt: -------------------------------------------------------------------------------- 1 | 2 | $newParamA = new \Jaspersoft\Dto\ReportExecution\Parameter(); 3 | $newParamA->name = "Country"; 4 | $newParamA->value = "Mexico"; 5 | 6 | $newParamB = new \Jaspersoft\Dto\ReportExecution\Parameter(); 7 | $newParamB->name = "City"; 8 | $newParamB->value = array("D.F.", "Puebla", "Oaxaca", "Acapulco"); 9 | 10 | $c->reportExecutionService()->updateReportExecutionParameters($executionData->requestId, array($newParamA, $newParamB), true); -------------------------------------------------------------------------------- /docs/code/executions_request.txt: -------------------------------------------------------------------------------- 1 | 2 | $request = new \Jaspersoft\Dto\ReportExecution\Request(); 3 | $request->reportUnitUri = "/public/Samples/Reports/AllAccounts"; 4 | $request->async = true; 5 | $request->outputFormat = "html"; 6 | $request->attachmentsPrefix = "{contextPath}/rest_v2/reportExecutions/{reportExecutionId}/exports/{exportExecutionId}/attachments/"; 7 | -------------------------------------------------------------------------------- /docs/code/export_execution.txt: -------------------------------------------------------------------------------- 1 | 2 | $exportRequest = new \Jaspersoft\Dto\ReportExecution\Export\Request(); 3 | $exportRequest->outputFormat = "html"; 4 | $exportRequest->pages = "5-15"; 5 | $exportRequest->allowInlineScripts = true; 6 | 7 | $exportData = $c->reportExecutionService()->runExportExecution($executionData->requestId, $exportRequest); -------------------------------------------------------------------------------- /docs/code/export_execution_attachment.txt: -------------------------------------------------------------------------------- 1 | 2 | $attachmentData = $c->reportExecutionService()->getExportOutputResourceAttachment($executionData->requestId, $exportData->id, "img_0_0_0"); 3 | 4 | header('Content-Type: image/png'); 5 | header('Content-Length: ' . strlen($attachmentData)); 6 | echo $attachmentData; -------------------------------------------------------------------------------- /docs/code/export_execution_resource.txt: -------------------------------------------------------------------------------- 1 | 2 | $output = $c->reportExecutionService()->getExportOutputResource($executionData->requestId, $exportData->id); 3 | 4 | // Serve the binary resource to client 5 | header('Content-Type: ' . $output->contentType); 6 | header('Content-Length: ' . strlen($output->binaryContent)); 7 | echo $output->binaryContent; -------------------------------------------------------------------------------- /docs/code/export_execution_status.txt: -------------------------------------------------------------------------------- 1 | 2 | $c->reportExecutionService()->getExportExecutionStatus($executionData->requestId, $exportData->id); -------------------------------------------------------------------------------- /docs/code/export_service.txt: -------------------------------------------------------------------------------- 1 | header('Content-Type: text/html; charset=utf-8'); 2 | // The export service can take longer than 60 seconds to execute, so it is necessary to change the server execution time limit 3 | set_time_limit(0); 4 | 5 | $request->users[] = "jasperadmin"; 6 | 7 | $metadata = $c->importExportService()->startExportTask($request); 8 | 9 | $decline = true; 10 | while ($decline) { 11 | $state = $c->importExportService()->getExportState($metadata->id); 12 | if ($state->phase == "finished") { 13 | $decline = false; 14 | echo "
Export task complete, downloading...."; 15 | } else { 16 | echo "Export in progress...
"; 17 | @flush(); 18 | @ob_flush(); 19 | sleep(10); 20 | } 21 | } 22 | 23 | $f = fopen('export.zip', 'w'); 24 | $data = $c->importExportService()->fetchExport($metadata->id); 25 | fwrite($f, $data); 26 | fclose($f); 27 | 28 | echo "

Export catalog available for download here."; -------------------------------------------------------------------------------- /docs/code/get_attributes.txt: -------------------------------------------------------------------------------- 1 | $californiaUser = $c->userService()->getUser("CaliforniaUser", "organization_1"); 2 | $attributes = $c->userService()->getAttributes($californiaUser); -------------------------------------------------------------------------------- /docs/code/get_input_control_structure.txt: -------------------------------------------------------------------------------- 1 | 2 | $inputControlStructure = $c->reportService()->getInputControlStructure("/public/samples/Cascading_multi_select_report"); 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/code/get_input_control_values.txt: -------------------------------------------------------------------------------- 1 | 2 | $values = $c->reportService()->getInputControlValues("/public/samples/reports/Cascading_multi_select"); 3 | foreach ($values as $ic) { 4 | echo "Control ID: " . $ic->id . "
"; 5 | foreach ($ic->options as $opt) { 6 | $label = $opt['label']; 7 | $selected = ($opt['selected']) ? 'true' : 'false'; 8 | echo "\t Option: " . $label . " | \t\t\t " . $selected . "
"; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /docs/code/get_input_controls.txt: -------------------------------------------------------------------------------- 1 | $input_controls = $c->reportService()->getReportInputControls('/reports/samples/Cascading_multi_select_report'); 2 | 3 | foreach($input_controls as $ic) { 4 | printf('Key: %s
', $ic->id); 5 | foreach ($ic->options as $ico) { 6 | printf(' -- Value: %s
', $ico['label']); 7 | } 8 | } -------------------------------------------------------------------------------- /docs/code/get_job.txt: -------------------------------------------------------------------------------- 1 | $allAccountsJobs = $c->jobService()->searchJobs("/reports/samples/AllAccounts"); 2 | $first_job_details = $c->jobService()->getJob($allAccountsJobs[0]->id); -------------------------------------------------------------------------------- /docs/code/get_many_roles.txt: -------------------------------------------------------------------------------- 1 | $server_roles = $c->roleService()->searchRoles(); -------------------------------------------------------------------------------- /docs/code/get_options.txt: -------------------------------------------------------------------------------- 1 | $report_options = $c->optionsService()->getReportOptions('/reports/samples/Cascading_multi_select_report'); 2 | 3 | foreach($report_options as $ro) { 4 | echo $ro->label . "
"; 5 | } -------------------------------------------------------------------------------- /docs/code/get_organization.txt: -------------------------------------------------------------------------------- 1 | $org_one = $c->organizationService()->getOrganization("organization_1"); 2 | 3 | // Print the details of the $org_one Organization object 4 | var_dump($org_one); -------------------------------------------------------------------------------- /docs/code/get_repository.txt: -------------------------------------------------------------------------------- 1 | // Returns entire repository 2 | $repo = $c->repositoryService()->searchResources(); 3 | 4 | // Search for specific items in repository 5 | $criteria = new RepositorySearchCriteria(); 6 | $criteria->q = "logo"; 7 | 8 | $results = $c->repositoryService()->searchResources($criteria); 9 | 10 | foreach ($results->items as $res) { 11 | echo $res->label . "
"; 12 | } -------------------------------------------------------------------------------- /docs/code/get_role.txt: -------------------------------------------------------------------------------- 1 | $user_role = $c->roleService()->getRole("ROLE_USER"); -------------------------------------------------------------------------------- /docs/code/import_service.txt: -------------------------------------------------------------------------------- 1 | $request = new ImportTask; 2 | $request->update = true; 3 | 4 | $metadata = $c->importExportService()->startImportTask($request, file_get_contents('import_data.zip')); 5 | 6 | $continue = true; 7 | while($continue) { 8 | $state = $c->importExportService()->getImportState($metadata->id); 9 | if ($state->phase == 'finished') { 10 | $continue = false; 11 | echo "

Import complete!"; 12 | } else { 13 | echo "Import in progress...
"; 14 | @ob_flush(); 15 | @flush(); 16 | sleep(10); 17 | } 18 | } -------------------------------------------------------------------------------- /docs/code/logcollector_create.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | $fb = new LogCollectorFilter(); 4 | $fb->userId = "jasperadmin|organization_1"; 5 | 6 | $lcs = new LogCollectorSettings(); 7 | $lcs->name = "jasperadmin log"; 8 | $lcs->verbosity = "HIGH"; 9 | $lcs->filterBy = $fb; 10 | 11 | $jasperadmin_log = $c->logCollectorService->createLogCollector($lcs); -------------------------------------------------------------------------------- /docs/code/logcollector_delete.txt: -------------------------------------------------------------------------------- 1 | 2 | $c->logCollectorService()->deleteAllLogCollectors(); -------------------------------------------------------------------------------- /docs/code/logcollector_download.txt: -------------------------------------------------------------------------------- 1 | 2 | $allLogs = $c->logCollectorService()->downloadAllLogCollectorContentZip(); 3 | header("Content-Type: application/zip"); 4 | header("Content-Disposition: attachment;filename=logs.zip"); 5 | 6 | echo $allLogs; -------------------------------------------------------------------------------- /docs/code/logcollector_state.txt: -------------------------------------------------------------------------------- 1 | 2 | $collectors = $c->logCollectorService->logCollectorStates(); 3 | 4 | $jasperadmin_log_state = $c->logCollectorService->logCollectorState($jasperadmin_log->id()); -------------------------------------------------------------------------------- /docs/code/logcollector_stopall.txt: -------------------------------------------------------------------------------- 1 | 2 | $c->logCollectorService()->stopAllLogCollectors(); -------------------------------------------------------------------------------- /docs/code/logcollector_update.txt: -------------------------------------------------------------------------------- 1 | 2 | $jasperadmin_log->verbosity = "LOW"; 3 | $jasperadmin_log = $c->logCollectorService()->updateLogCollector($jasperadmin_log); -------------------------------------------------------------------------------- /docs/code/move_resource.txt: -------------------------------------------------------------------------------- 1 | $c->repositoryService()->moveResource("/ImageFolder", "/MyReports"); -------------------------------------------------------------------------------- /docs/code/pause_job.txt: -------------------------------------------------------------------------------- 1 | $c->jobService()->pauseJob(); -------------------------------------------------------------------------------- /docs/code/reorder_input_controls.txt: -------------------------------------------------------------------------------- 1 | 2 | $controls = $c->reportService()->getInputControlStructure("/public/samples/reports/Cascading_multi_select"); 3 | 4 | // Swap array elements 5 | $temp = $controls[0]; 6 | $controls[0] = $controls[2]; 7 | $controls[2] = $temp; 8 | 9 | $newControls = $c->reportService()->updateInputControlOrder("/public/samples/reports/Cascading_multi_select", $controls); 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/code/resume_job.txt: -------------------------------------------------------------------------------- 1 | $c->jobService()->resumeJob(); -------------------------------------------------------------------------------- /docs/code/run_report_html.txt: -------------------------------------------------------------------------------- 1 | $report = $c->reportService()->runReport('/reports/samples/AllAccounts', 'html'); 2 | 3 | echo $report; -------------------------------------------------------------------------------- /docs/code/run_report_ic.txt: -------------------------------------------------------------------------------- 1 | $controls = array( 2 | 'Country_multi_select' => array('USA', 'Mexico'), 3 | 'Cascading_state_multi_select' => array('CA', 'OR') 4 | ); 5 | 6 | 7 | $report = $c->reportService()->runReport('/reports/samples/Cascading_multi_select_report', 'html', null, null, $controls); 8 | 9 | echo $report; -------------------------------------------------------------------------------- /docs/code/search_jobs.txt: -------------------------------------------------------------------------------- 1 | $allAccountsJobs = $c->jobService()->searchJobs("/reports/samples/AllAccounts"); 2 | print_r($allAccountsJobs); -------------------------------------------------------------------------------- /docs/code/search_organization.txt: -------------------------------------------------------------------------------- 1 | $found = $c->organizationService()->searchOrganization('org'); 2 | foreach ($found as $result) 3 | printf('
Organization Found: %s', $result->id); -------------------------------------------------------------------------------- /docs/code/search_permissions.txt: -------------------------------------------------------------------------------- 1 | $permissions = $c->permissionService()->searchRepositoryPermissions("/reports/samples/AllAccounts"); 2 | foreach($permissions as $p) 3 | echo $p->recipient . "
"; -------------------------------------------------------------------------------- /docs/code/search_user.txt: -------------------------------------------------------------------------------- 1 | $results = $c->userService()->searchUsers('j', 'organization_1'); 2 | 3 | foreach ($results as $userLookup) { 4 | $user = $c->userService()->getUserByLookup($userLookup); 5 | printf('
Found user: %s', $user->fullName); 6 | foreach ($user->roles as $role) 7 | printf('
%10s User has role: %s', ' ', $role->roleName); 8 | } -------------------------------------------------------------------------------- /docs/code/server_info.txt: -------------------------------------------------------------------------------- 1 | $info = $c->serverInfo(); 2 | 3 | print_r($info); -------------------------------------------------------------------------------- /docs/code/service_access.txt: -------------------------------------------------------------------------------- 1 | // Store service for several calls 2 | $js = $c->jobService(); 3 | $js->getJobs("/reports/samples/AllAccounts"); 4 | 5 | // Or access service methods directly 6 | $c->jobService()->getJobs("/reports/samples/AllAccounts"); -------------------------------------------------------------------------------- /docs/code/thumbnail_jpeg.txt: -------------------------------------------------------------------------------- 1 | 2 | header("Content-Type: image/jpeg"); 3 | echo $c->getThumbnailAsJpeg("/public/Samples/Reports/06g.ProfitDetailReport"); 4 | -------------------------------------------------------------------------------- /docs/code/thumbnail_string.txt: -------------------------------------------------------------------------------- 1 | 2 | echo "'"; -------------------------------------------------------------------------------- /docs/code/thumbnails_get.txt: -------------------------------------------------------------------------------- 1 | 2 | $reports = array( 3 | "/public/Samples/Reports/07g.RevenueDetailReport", 4 | "/public/Samples/Reports/5g.AccountsReport", 5 | "/public/Samples/Reports/06g.ProfitDetailReport" 6 | ); 7 | 8 | $thumbnails = $c->thumbnailService()->getResourceThumbnails($reports); 9 | 10 | foreach ($thumbnails as $t) { 11 | echo "

" . $t->uri . "


"; 12 | echo "
"; 13 | } -------------------------------------------------------------------------------- /docs/code/update_attributes.txt: -------------------------------------------------------------------------------- 1 | $joeUser = $c->userService()->getUser("joeuser", "organization_1"); 2 | 3 | $age_attr = new Attribute("Age", "22"); 4 | $beer_attr = new Attribute("Beer of Choice", "Anchor Steam"); 5 | $c->userService()->replaceAttributes($joeUser, array($age_attr, $beer_attr)); -------------------------------------------------------------------------------- /docs/code/update_input_control_structure.txt: -------------------------------------------------------------------------------- 1 | 2 | $parameters = array("Country" => array("Mexico", "USA")); 3 | 4 | $newStruct = $c->reportService()->updateInputControls("/public/samples/reports/Cascading_multi_select"); 5 | -------------------------------------------------------------------------------- /docs/code/update_input_control_values.txt: -------------------------------------------------------------------------------- 1 | 2 | $parameters = array("Country" => array("Mexico", "USA")); 3 | 4 | $newStruct = $c->reportService()->updateInputControlValues("/public/samples/reports/Cascading_multi_select"); 5 | -------------------------------------------------------------------------------- /docs/code/update_job.txt: -------------------------------------------------------------------------------- 1 | $allAccountsJobs = $c->jobService()->searchJobs("/reports/samples/AllAccounts"); 2 | $job = $c->jobService()->getJob($allAccountsJobs[0]->id); 3 | 4 | $job->label = "New label"; 5 | $c->jobService()->updateJob($job); -------------------------------------------------------------------------------- /docs/code/update_options.txt: -------------------------------------------------------------------------------- 1 | $success = $c->optionsService()->updateReportOptions( 2 | '/reports/samples/Cascading_multi_select_report', 3 | array('Country_multi_select' => array('Canada', 'USA'), 'Cascading_state_multi_select' => array('OR', 'WA', 'BC')), 4 | 'CanadaUSA', 5 | 'true'); 6 | if ($success) { 7 | echo "Created new report option successfully"; 8 | } -------------------------------------------------------------------------------- /docs/code/update_organization.txt: -------------------------------------------------------------------------------- 1 | $search = $c->organizationService()->searchOrganization('test_organization'); 2 | $organization = $search[0]; 3 | $organization->tenantDesc = "My test organization"; 4 | 5 | try { 6 | $c->organizationService()->updateOrganization($organization); 7 | } catch (Exception $e) { 8 | printf('Unable to modify organization: %s', $e->getMessage()); 9 | } -------------------------------------------------------------------------------- /docs/code/update_permission.txt: -------------------------------------------------------------------------------- 1 | $perms = $c->permissionService()->searchRepositoryPermissions("/reports/samples/AllAccounts"); 2 | $perms[0]->mask = 0; 3 | 4 | $c->permissionService()->updateRepositoryPermission($perms[0]); -------------------------------------------------------------------------------- /docs/code/update_permissions.txt: -------------------------------------------------------------------------------- 1 | $perms = $c->permissionService()->searchRepositoryPermissions("/reports/samples/AllAccounts"); 2 | $perms[0]->mask = 0; 3 | 4 | $c->permissionService()->updateRepositoryPermissions("/reports/samples/AllAccounts", $perms); -------------------------------------------------------------------------------- /docs/code/update_role.txt: -------------------------------------------------------------------------------- 1 | $robot_role = $c->roleService()->getRole("ROLE_ROBOT", "organization_1"); 2 | $old_name = $robot_role->roleName; 3 | $robot_role->roleName = "ROLE_HUMAN"; 4 | $c->roleService()->updateRole($robot_role, $old_name); 5 | -------------------------------------------------------------------------------- /docs/code/update_user.txt: -------------------------------------------------------------------------------- 1 | $search = $c->userService()->searchUsers('californiaUser', 'organization_1'); 2 | $californiaUser = $c->userService()->getUserByLookup($search[0]); 3 | 4 | $californiaUser->emailAddress('sanfrancisco-oakland@example.com'); 5 | $californiaUser->password('SUPERstrongPASSWORD###!!!'); 6 | 7 | try { 8 | $c->userService()->addOrUpdateUser($californiaUser); 9 | } catch (Exception $e) { 10 | printf('Attempt to modify the user failed with error: %s', $e->getMessage()); 11 | } 12 | -------------------------------------------------------------------------------- /docs/highlight/AUTHORS.en.txt: -------------------------------------------------------------------------------- 1 | Syntax highlighting with language autodetection. 2 | 3 | URL: http://softwaremaniacs.org/soft/highlight/en/ 4 | 5 | Original author and current maintainer: 6 | Ivan Sagalaev 7 | 8 | Contributors: 9 | 10 | - Peter Leonov 11 | - Victor Karamzin 12 | - Vsevolod Solovyov 13 | - Anton Kovalyov 14 | - Nikita Ledyaev 15 | - Konstantin Evdokimenko 16 | - Dmitri Roudakov 17 | - Yuri Ivanov 18 | - Vladimir Ermakov 19 | - Vladimir Gubarkov 20 | - Brian Beck 21 | - MajestiC 22 | - Vasily Polovnyov 23 | - Vladimir Epifanov 24 | - Alexander Makarov 25 | - Vah 26 | - Shuen-Huei Guan 27 | - Jason Diamond 28 | - Michal Gabrukiewicz 29 | - Ruslan Keba 30 | - Sergey Baranov 31 | - Zaripov Yura 32 | - Oleg Volchkov 33 | - Vasily Mikhailitchenko 34 | - Jan Berkel 35 | - Vladimir Moskva 36 | - Loren Segal 37 | - Andrew Fedorov 38 | - Igor Kalnitsky 39 | - Jeremy Hull 40 | - Valerii Hiora 41 | - Nikolay Zakharov 42 | - Dmitry Kovega 43 | - Sergey Ignatov 44 | - Antono Vasiljev 45 | - Stephan Kountso 46 | - pumbur 47 | - John Crepezzi 48 | - Andrey Vlasovskikh 49 | - Alexander Myadzel 50 | - Evgeny Stepanischev 51 | - Dmytrii Nagirniak 52 | - Oleg Efimov 53 | - Luigi Maselli 54 | - Denis Bardadym 55 | - Aahan Krish 56 | - Ilya Baryshev 57 | - Aleksandar Ruzicic 58 | - Joe Cheng 59 | - Angel G. Olloqui 60 | - Jason Tate 61 | - Sergey Tikhomirov 62 | - Marc Fornos 63 | - Yoshihide Jimbo 64 | - Casey Duncan -------------------------------------------------------------------------------- /docs/highlight/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006, Ivan Sagalaev 2 | All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of highlight.js nor the names of its contributors 12 | may be used to endorse or promote products derived from this software 13 | without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY 16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /docs/highlight/styles/arta.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 17.V.2011 3 | Author: pumbur 4 | */ 5 | 6 | pre code 7 | { 8 | display: block; padding: 0.5em; 9 | background: #222; 10 | } 11 | 12 | pre .profile .header *, 13 | pre .ini .title, 14 | pre .nginx .title 15 | { 16 | color: #fff; 17 | } 18 | 19 | pre .comment, 20 | pre .javadoc, 21 | pre .preprocessor, 22 | pre .preprocessor .title, 23 | pre .shebang, 24 | pre .profile .summary, 25 | pre .diff, 26 | pre .pi, 27 | pre .doctype, 28 | pre .tag, 29 | pre .template_comment, 30 | pre .css .rules, 31 | pre .tex .special 32 | { 33 | color: #444; 34 | } 35 | 36 | pre .string, 37 | pre .symbol, 38 | pre .diff .change, 39 | pre .regexp, 40 | pre .xml .attribute, 41 | pre .smalltalk .char, 42 | pre .xml .value, 43 | pre .ini .value 44 | { 45 | color: #ffcc33; 46 | } 47 | 48 | pre .number, 49 | pre .addition 50 | { 51 | color: #00cc66; 52 | } 53 | 54 | pre .built_in, 55 | pre .literal, 56 | pre .vhdl .typename, 57 | pre .go .constant, 58 | pre .go .typename, 59 | pre .ini .keyword, 60 | pre .lua .title, 61 | pre .perl .variable, 62 | pre .php .variable, 63 | pre .mel .variable, 64 | pre .django .variable, 65 | pre .css .funtion, 66 | pre .smalltalk .method, 67 | pre .hexcolor, 68 | pre .important, 69 | pre .flow, 70 | pre .inheritance, 71 | pre .parser3 .variable 72 | { 73 | color: #32AAEE; 74 | } 75 | 76 | pre .keyword, 77 | pre .tag .title, 78 | pre .css .tag, 79 | pre .css .class, 80 | pre .css .id, 81 | pre .css .pseudo, 82 | pre .css .attr_selector, 83 | pre .lisp .title, 84 | pre .winutils, 85 | pre .tex .command, 86 | pre .request, 87 | pre .status 88 | { 89 | color: #6644aa; 90 | } 91 | 92 | pre .title, 93 | pre .ruby .constant, 94 | pre .vala .constant, 95 | pre .parent, 96 | pre .deletion, 97 | pre .template_tag, 98 | pre .css .keyword, 99 | pre .objectivec .class .id, 100 | pre .smalltalk .class, 101 | pre .lisp .keyword, 102 | pre .apache .tag, 103 | pre .nginx .variable, 104 | pre .envvar, 105 | pre .bash .variable, 106 | pre .go .built_in, 107 | pre .vbscript .built_in, 108 | pre .lua .built_in, 109 | pre .rsl .built_in, 110 | pre .tail, 111 | pre .avrasm .label, 112 | pre .tex .formula, 113 | pre .tex .formula * 114 | { 115 | color: #bb1166; 116 | } 117 | 118 | pre .yardoctag, 119 | pre .phpdoc, 120 | pre .profile .header, 121 | pre .ini .title, 122 | pre .apache .tag, 123 | pre .parser3 .title 124 | { 125 | font-weight: bold; 126 | } 127 | 128 | pre .coffeescript .javascript, 129 | pre .xml .javascript, 130 | pre .xml .css, 131 | pre .xml .cdata 132 | { 133 | opacity: 0.6; 134 | } 135 | 136 | pre code, 137 | pre .javascript, 138 | pre .css, 139 | pre .xml, 140 | pre .subst, 141 | pre .diff .chunk, 142 | pre .css .value, 143 | pre .css .attribute, 144 | pre .lisp .string, 145 | pre .lisp .number, 146 | pre .tail .params, 147 | pre .container, 148 | pre .haskell *, 149 | pre .erlang *, 150 | pre .erlang_repl * 151 | { 152 | color: #aaa; 153 | } 154 | -------------------------------------------------------------------------------- /docs/highlight/styles/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: white; color: black; 10 | } 11 | 12 | pre .string, 13 | pre .tag .value, 14 | pre .filter .argument, 15 | pre .addition, 16 | pre .change, 17 | pre .apache .tag, 18 | pre .apache .cbracket, 19 | pre .nginx .built_in, 20 | pre .tex .formula { 21 | color: #888; 22 | } 23 | 24 | pre .comment, 25 | pre .template_comment, 26 | pre .shebang, 27 | pre .doctype, 28 | pre .pi, 29 | pre .javadoc, 30 | pre .deletion, 31 | pre .apache .sqbracket { 32 | color: #CCC; 33 | } 34 | 35 | pre .keyword, 36 | pre .tag .title, 37 | pre .ini .title, 38 | pre .lisp .title, 39 | pre .http .title, 40 | pre .nginx .title, 41 | pre .css .tag, 42 | pre .winutils, 43 | pre .flow, 44 | pre .apache .tag, 45 | pre .tex .command, 46 | pre .request, 47 | pre .status { 48 | font-weight: bold; 49 | } 50 | -------------------------------------------------------------------------------- /docs/highlight/styles/brown_paper.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Brown Paper style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background:#b7a68e url(./brown_papersq.png); 10 | } 11 | 12 | pre .keyword, 13 | pre .literal, 14 | pre .change, 15 | pre .winutils, 16 | pre .flow, 17 | pre .lisp .title, 18 | pre .nginx .title, 19 | pre .tex .special, 20 | pre .request, 21 | pre .status { 22 | color:#005599; 23 | font-weight:bold; 24 | } 25 | 26 | pre code, 27 | pre .ruby .subst, 28 | pre .tag .keyword { 29 | color: #363C69; 30 | } 31 | 32 | pre .string, 33 | pre .title, 34 | pre .haskell .type, 35 | pre .tag .value, 36 | pre .css .rules .value, 37 | pre .preprocessor, 38 | pre .ruby .symbol, 39 | pre .ruby .symbol .string, 40 | pre .ruby .symbol .keyword, 41 | pre .ruby .symbol .keymethods, 42 | pre .ruby .instancevar, 43 | pre .ruby .class .parent, 44 | pre .built_in, 45 | pre .sql .aggregate, 46 | pre .django .template_tag, 47 | pre .django .variable, 48 | pre .smalltalk .class, 49 | pre .javadoc, 50 | pre .ruby .string, 51 | pre .django .filter .argument, 52 | pre .smalltalk .localvars, 53 | pre .smalltalk .array, 54 | pre .attr_selector, 55 | pre .pseudo, 56 | pre .addition, 57 | pre .stream, 58 | pre .envvar, 59 | pre .apache .tag, 60 | pre .apache .cbracket, 61 | pre .tex .number { 62 | color: #2C009F; 63 | } 64 | 65 | pre .comment, 66 | pre .java .annotation, 67 | pre .python .decorator, 68 | pre .template_comment, 69 | pre .pi, 70 | pre .doctype, 71 | pre .deletion, 72 | pre .shebang, 73 | pre .apache .sqbracket, 74 | pre .nginx .built_in, 75 | pre .tex .formula { 76 | color: #802022; 77 | } 78 | 79 | pre .keyword, 80 | pre .literal, 81 | pre .css .id, 82 | pre .phpdoc, 83 | pre .title, 84 | pre .haskell .type, 85 | pre .vbscript .built_in, 86 | pre .sql .aggregate, 87 | pre .rsl .built_in, 88 | pre .smalltalk .class, 89 | pre .diff .header, 90 | pre .chunk, 91 | pre .winutils, 92 | pre .bash .variable, 93 | pre .apache .tag, 94 | pre .tex .command { 95 | font-weight: bold; 96 | } 97 | 98 | pre .coffeescript .javascript, 99 | pre .xml .css, 100 | pre .xml .javascript, 101 | pre .xml .vbscript, 102 | pre .tex .formula { 103 | opacity: 0.8; 104 | } 105 | -------------------------------------------------------------------------------- /docs/highlight/styles/brown_papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jaspersoft/jrs-rest-php-client/32dc45485030c6339e636c309cd5280af6479bf4/docs/highlight/styles/brown_papersq.png -------------------------------------------------------------------------------- /docs/highlight/styles/dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dark style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #444; 10 | } 11 | 12 | pre .keyword, 13 | pre .literal, 14 | pre .change, 15 | pre .winutils, 16 | pre .flow, 17 | pre .lisp .title, 18 | pre .nginx .title, 19 | pre .tex .special { 20 | color: white; 21 | } 22 | 23 | pre code, 24 | pre .ruby .subst { 25 | color: #DDD; 26 | } 27 | 28 | pre .string, 29 | pre .title, 30 | pre .haskell .type, 31 | pre .ini .title, 32 | pre .tag .value, 33 | pre .css .rules .value, 34 | pre .preprocessor, 35 | pre .ruby .symbol, 36 | pre .ruby .symbol .string, 37 | pre .ruby .symbol .keyword, 38 | pre .ruby .symbol .keymethods, 39 | pre .ruby .instancevar, 40 | pre .ruby .class .parent, 41 | pre .built_in, 42 | pre .sql .aggregate, 43 | pre .django .template_tag, 44 | pre .django .variable, 45 | pre .smalltalk .class, 46 | pre .javadoc, 47 | pre .ruby .string, 48 | pre .django .filter .argument, 49 | pre .smalltalk .localvars, 50 | pre .smalltalk .array, 51 | pre .attr_selector, 52 | pre .pseudo, 53 | pre .addition, 54 | pre .stream, 55 | pre .envvar, 56 | pre .apache .tag, 57 | pre .apache .cbracket, 58 | pre .tex .command, 59 | pre .input_number { 60 | color: #D88; 61 | } 62 | 63 | pre .comment, 64 | pre .java .annotation, 65 | pre .python .decorator, 66 | pre .template_comment, 67 | pre .pi, 68 | pre .doctype, 69 | pre .deletion, 70 | pre .shebang, 71 | pre .apache .sqbracket, 72 | pre .tex .formula { 73 | color: #777; 74 | } 75 | 76 | pre .keyword, 77 | pre .literal, 78 | pre .title, 79 | pre .css .id, 80 | pre .phpdoc, 81 | pre .haskell .type, 82 | pre .vbscript .built_in, 83 | pre .sql .aggregate, 84 | pre .rsl .built_in, 85 | pre .smalltalk .class, 86 | pre .diff .header, 87 | pre .chunk, 88 | pre .winutils, 89 | pre .bash .variable, 90 | pre .apache .tag, 91 | pre .tex .special, 92 | pre .request, 93 | pre .status { 94 | font-weight: bold; 95 | } 96 | 97 | pre .coffeescript .javascript, 98 | pre .xml .css, 99 | pre .xml .javascript, 100 | pre .xml .vbscript, 101 | pre .tex .formula { 102 | opacity: 0.5; 103 | } 104 | -------------------------------------------------------------------------------- /docs/highlight/styles/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #F0F0F0; 10 | } 11 | 12 | pre code, 13 | pre .ruby .subst, 14 | pre .tag .title, 15 | pre .lisp .title, 16 | pre .nginx .title { 17 | color: black; 18 | } 19 | 20 | pre .string, 21 | pre .title, 22 | pre .constant, 23 | pre .parent, 24 | pre .tag .value, 25 | pre .rules .value, 26 | pre .rules .value .number, 27 | pre .preprocessor, 28 | pre .ruby .symbol, 29 | pre .ruby .symbol .string, 30 | pre .ruby .symbol .keyword, 31 | pre .ruby .symbol .keymethods, 32 | pre .instancevar, 33 | pre .aggregate, 34 | pre .template_tag, 35 | pre .django .variable, 36 | pre .smalltalk .class, 37 | pre .addition, 38 | pre .flow, 39 | pre .stream, 40 | pre .bash .variable, 41 | pre .apache .tag, 42 | pre .apache .cbracket, 43 | pre .tex .command, 44 | pre .tex .special, 45 | pre .erlang_repl .function_or_atom, 46 | pre .markdown .header { 47 | color: #800; 48 | } 49 | 50 | pre .comment, 51 | pre .annotation, 52 | pre .template_comment, 53 | pre .diff .header, 54 | pre .chunk, 55 | pre .markdown .blockquote { 56 | color: #888; 57 | } 58 | 59 | pre .number, 60 | pre .date, 61 | pre .regexp, 62 | pre .literal, 63 | pre .smalltalk .symbol, 64 | pre .smalltalk .char, 65 | pre .go .constant, 66 | pre .change, 67 | pre .markdown .bullet, 68 | pre .markdown .link_url { 69 | color: #080; 70 | } 71 | 72 | pre .label, 73 | pre .javadoc, 74 | pre .ruby .string, 75 | pre .decorator, 76 | pre .filter .argument, 77 | pre .localvars, 78 | pre .array, 79 | pre .attr_selector, 80 | pre .important, 81 | pre .pseudo, 82 | pre .pi, 83 | pre .doctype, 84 | pre .deletion, 85 | pre .envvar, 86 | pre .shebang, 87 | pre .apache .sqbracket, 88 | pre .nginx .built_in, 89 | pre .tex .formula, 90 | pre .erlang_repl .reserved, 91 | pre .input_number, 92 | pre .markdown .link_label, 93 | pre .vhdl .attribute { 94 | color: #88F 95 | } 96 | 97 | pre .keyword, 98 | pre .id, 99 | pre .phpdoc, 100 | pre .title, 101 | pre .built_in, 102 | pre .aggregate, 103 | pre .css .tag, 104 | pre .javadoctag, 105 | pre .phpdoc, 106 | pre .yardoctag, 107 | pre .smalltalk .class, 108 | pre .winutils, 109 | pre .bash .variable, 110 | pre .apache .tag, 111 | pre .go .typename, 112 | pre .tex .command, 113 | pre .markdown .strong, 114 | pre .request, 115 | pre .status { 116 | font-weight: bold; 117 | } 118 | 119 | pre .markdown .emphasis { 120 | font-style: italic; 121 | } 122 | 123 | pre .nginx .built_in { 124 | font-weight: normal; 125 | } 126 | 127 | pre .coffeescript .javascript, 128 | pre .xml .css, 129 | pre .xml .javascript, 130 | pre .xml .vbscript, 131 | pre .tex .formula { 132 | opacity: 0.5; 133 | } 134 | -------------------------------------------------------------------------------- /docs/highlight/styles/far.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | FAR Style (c) MajestiC 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #000080; 10 | } 11 | 12 | pre code, 13 | .ruby .subst { 14 | color: #0FF; 15 | } 16 | 17 | pre .string, 18 | pre .ruby .string, 19 | pre .haskell .type, 20 | pre .tag .value, 21 | pre .css .rules .value, 22 | pre .css .rules .value .number, 23 | pre .preprocessor, 24 | pre .ruby .symbol, 25 | pre .ruby .symbol .string, 26 | pre .ruby .symbol .keyword, 27 | pre .ruby .symbol .keymethods, 28 | pre .built_in, 29 | pre .sql .aggregate, 30 | pre .django .template_tag, 31 | pre .django .variable, 32 | pre .smalltalk .class, 33 | pre .addition, 34 | pre .apache .tag, 35 | pre .apache .cbracket, 36 | pre .tex .command { 37 | color: #FF0; 38 | } 39 | 40 | pre .keyword, 41 | pre .css .id, 42 | pre .title, 43 | pre .haskell .type, 44 | pre .vbscript .built_in, 45 | pre .sql .aggregate, 46 | pre .rsl .built_in, 47 | pre .smalltalk .class, 48 | pre .xml .tag .title, 49 | pre .winutils, 50 | pre .flow, 51 | pre .change, 52 | pre .envvar, 53 | pre .bash .variable, 54 | pre .tex .special { 55 | color: #FFF; 56 | } 57 | 58 | pre .comment, 59 | pre .phpdoc, 60 | pre .javadoc, 61 | pre .java .annotation, 62 | pre .template_comment, 63 | pre .deletion, 64 | pre .apache .sqbracket, 65 | pre .tex .formula { 66 | color: #888; 67 | } 68 | 69 | pre .number, 70 | pre .date, 71 | pre .regexp, 72 | pre .literal, 73 | pre .smalltalk .symbol, 74 | pre .smalltalk .char { 75 | color: #0F0; 76 | } 77 | 78 | pre .python .decorator, 79 | pre .django .filter .argument, 80 | pre .smalltalk .localvars, 81 | pre .smalltalk .array, 82 | pre .attr_selector, 83 | pre .pseudo, 84 | pre .xml .pi, 85 | pre .diff .header, 86 | pre .chunk, 87 | pre .shebang, 88 | pre .nginx .built_in, 89 | pre .input_number { 90 | color: #008080; 91 | } 92 | 93 | pre .keyword, 94 | pre .css .id, 95 | pre .title, 96 | pre .haskell .type, 97 | pre .vbscript .built_in, 98 | pre .sql .aggregate, 99 | pre .rsl .built_in, 100 | pre .smalltalk .class, 101 | pre .winutils, 102 | pre .flow, 103 | pre .apache .tag, 104 | pre .nginx .built_in, 105 | pre .tex .command, 106 | pre .tex .special, 107 | pre .request, 108 | pre .status { 109 | font-weight: bold; 110 | } 111 | -------------------------------------------------------------------------------- /docs/highlight/styles/github.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | github.com style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | color: #000; 10 | background: #f8f8ff 11 | } 12 | 13 | pre .comment, 14 | pre .template_comment, 15 | pre .diff .header, 16 | pre .javadoc { 17 | color: #998; 18 | font-style: italic 19 | } 20 | 21 | pre .keyword, 22 | pre .css .rule .keyword, 23 | pre .winutils, 24 | pre .javascript .title, 25 | pre .lisp .title, 26 | pre .nginx .title, 27 | pre .subst, 28 | pre .request, 29 | pre .status { 30 | color: #000; 31 | font-weight: bold 32 | } 33 | 34 | pre .number, 35 | pre .hexcolor { 36 | color: #40a070 37 | } 38 | 39 | pre .string, 40 | pre .tag .value, 41 | pre .phpdoc, 42 | pre .tex .formula { 43 | color: #d14 44 | } 45 | 46 | pre .title, 47 | pre .id { 48 | color: #900; 49 | font-weight: bold 50 | } 51 | 52 | pre .javascript .title, 53 | pre .lisp .title, 54 | pre .subst { 55 | font-weight: normal 56 | } 57 | 58 | pre .class .title, 59 | pre .haskell .type, 60 | pre .vhdl .literal, 61 | pre .tex .command { 62 | color: #458; 63 | font-weight: bold 64 | } 65 | 66 | pre .tag, 67 | pre .tag .title, 68 | pre .rules .property, 69 | pre .django .tag .keyword { 70 | color: #000080; 71 | font-weight: normal 72 | } 73 | 74 | pre .attribute, 75 | pre .variable, 76 | pre .instancevar, 77 | pre .lisp .body { 78 | color: #008080 79 | } 80 | 81 | pre .regexp { 82 | color: #009926 83 | } 84 | 85 | pre .class { 86 | color: #458; 87 | font-weight: bold 88 | } 89 | 90 | pre .symbol, 91 | pre .ruby .symbol .string, 92 | pre .ruby .symbol .keyword, 93 | pre .ruby .symbol .keymethods, 94 | pre .lisp .keyword, 95 | pre .tex .special, 96 | pre .input_number { 97 | color: #990073 98 | } 99 | 100 | pre .builtin, 101 | pre .built_in, 102 | pre .lisp .title { 103 | color: #0086b3 104 | } 105 | 106 | pre .preprocessor, 107 | pre .pi, 108 | pre .doctype, 109 | pre .shebang, 110 | pre .cdata { 111 | color: #999; 112 | font-weight: bold 113 | } 114 | 115 | pre .deletion { 116 | background: #fdd 117 | } 118 | 119 | pre .addition { 120 | background: #dfd 121 | } 122 | 123 | pre .diff .change { 124 | background: #0086b3 125 | } 126 | 127 | pre .chunk { 128 | color: #aaa 129 | } 130 | 131 | pre .tex .formula { 132 | opacity: 0.5; 133 | } 134 | -------------------------------------------------------------------------------- /docs/highlight/styles/googlecode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Google Code style (c) Aahan Krish 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: white; color: black; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .javadoc, 15 | pre .comment * { 16 | color: #800; 17 | } 18 | 19 | pre .keyword, 20 | pre .method, 21 | pre .list .title, 22 | pre .nginx .title, 23 | pre .tag .title, 24 | pre .setting .value, 25 | pre .winutils, 26 | pre .tex .command, 27 | pre .http .title, 28 | pre .request, 29 | pre .status { 30 | color: #008; 31 | } 32 | 33 | pre .envvar, 34 | pre .tex .special { 35 | color: #660; 36 | } 37 | 38 | pre .string, 39 | pre .tag .value, 40 | pre .cdata, 41 | pre .filter .argument, 42 | pre .attr_selector, 43 | pre .apache .cbracket, 44 | pre .date, 45 | pre .regexp { 46 | color: #080; 47 | } 48 | 49 | pre .sub .identifier, 50 | pre .pi, 51 | pre .tag, 52 | pre .tag .keyword, 53 | pre .decorator, 54 | pre .ini .title, 55 | pre .shebang, 56 | pre .input_number, 57 | pre .hexcolor, 58 | pre .rules .value, 59 | pre .css .value .number, 60 | pre .literal, 61 | pre .symbol, 62 | pre .ruby .symbol .string, 63 | pre .ruby .symbol .keyword, 64 | pre .ruby .symbol .keymethods, 65 | pre .number, 66 | pre .css .function { 67 | color: #066; 68 | } 69 | 70 | pre .class .title, 71 | pre .haskell .type, 72 | pre .smalltalk .class, 73 | pre .javadoctag, 74 | pre .yardoctag, 75 | pre .phpdoc, 76 | pre .typename, 77 | pre .tag .attribute, 78 | pre .doctype, 79 | pre .class .id, 80 | pre .built_in, 81 | pre .setting, 82 | pre .params, 83 | pre .variable { 84 | color: #606; 85 | } 86 | 87 | pre .css .tag, 88 | pre .rules .property, 89 | pre .pseudo, 90 | pre .subst { 91 | color: #000; 92 | } 93 | 94 | pre .css .class, pre .css .id { 95 | color: #9B703F; 96 | } 97 | 98 | pre .value .important { 99 | color: #ff7700; 100 | font-weight: bold; 101 | } 102 | 103 | pre .rules .keyword { 104 | color: #C5AF75; 105 | } 106 | 107 | pre .annotation, 108 | pre .apache .sqbracket, 109 | pre .nginx .built_in { 110 | color: #9B859D; 111 | } 112 | 113 | pre .preprocessor, 114 | pre .preprocessor * { 115 | color: #444; 116 | } 117 | 118 | pre .tex .formula { 119 | background-color: #EEE; 120 | font-style: italic; 121 | } 122 | 123 | pre .diff .header, 124 | pre .chunk { 125 | color: #808080; 126 | font-weight: bold; 127 | } 128 | 129 | pre .diff .change { 130 | background-color: #BCCFF9; 131 | } 132 | 133 | pre .addition { 134 | background-color: #BAEEBA; 135 | } 136 | 137 | pre .deletion { 138 | background-color: #FFC8BD; 139 | } 140 | 141 | pre .comment .yardoctag { 142 | font-weight: bold; 143 | } 144 | -------------------------------------------------------------------------------- /docs/highlight/styles/idea.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Intellij Idea-like styling (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | color: #000; 10 | background: #fff; 11 | } 12 | 13 | pre .subst, 14 | pre .title { 15 | font-weight: normal; 16 | color: #000; 17 | } 18 | 19 | pre .comment, 20 | pre .template_comment, 21 | pre .javadoc, 22 | pre .diff .header { 23 | color: #808080; 24 | font-style: italic; 25 | } 26 | 27 | pre .annotation, 28 | pre .decorator, 29 | pre .preprocessor, 30 | pre .doctype, 31 | pre .pi, 32 | pre .chunk, 33 | pre .shebang, 34 | pre .apache .cbracket, 35 | pre .input_number, 36 | pre .http .title { 37 | color: #808000; 38 | } 39 | 40 | pre .tag, 41 | pre .pi { 42 | background: #efefef; 43 | } 44 | 45 | pre .tag .title, 46 | pre .id, 47 | pre .attr_selector, 48 | pre .pseudo, 49 | pre .literal, 50 | pre .keyword, 51 | pre .hexcolor, 52 | pre .css .function, 53 | pre .ini .title, 54 | pre .css .class, 55 | pre .list .title, 56 | pre .nginx .title, 57 | pre .tex .command, 58 | pre .request, 59 | pre .status { 60 | font-weight: bold; 61 | color: #000080; 62 | } 63 | 64 | pre .attribute, 65 | pre .rules .keyword, 66 | pre .number, 67 | pre .date, 68 | pre .regexp, 69 | pre .tex .special { 70 | font-weight: bold; 71 | color: #0000ff; 72 | } 73 | 74 | pre .number, 75 | pre .regexp { 76 | font-weight: normal; 77 | } 78 | 79 | pre .string, 80 | pre .value, 81 | pre .filter .argument, 82 | pre .css .function .params, 83 | pre .apache .tag { 84 | color: #008000; 85 | font-weight: bold; 86 | } 87 | 88 | pre .symbol, 89 | pre .ruby .symbol .string, 90 | pre .ruby .symbol .keyword, 91 | pre .ruby .symbol .keymethods, 92 | pre .char, 93 | pre .tex .formula { 94 | color: #000; 95 | background: #d0eded; 96 | font-style: italic; 97 | } 98 | 99 | pre .phpdoc, 100 | pre .yardoctag, 101 | pre .javadoctag { 102 | text-decoration: underline; 103 | } 104 | 105 | pre .variable, 106 | pre .envvar, 107 | pre .apache .sqbracket, 108 | pre .nginx .built_in { 109 | color: #660e7a; 110 | } 111 | 112 | pre .addition { 113 | background: #baeeba; 114 | } 115 | 116 | pre .deletion { 117 | background: #ffc8bd; 118 | } 119 | 120 | pre .diff .change { 121 | background: #bccff9; 122 | } 123 | -------------------------------------------------------------------------------- /docs/highlight/styles/ir_black.css: -------------------------------------------------------------------------------- 1 | /* 2 | IR_Black style (c) Vasily Mikhailitchenko 3 | */ 4 | 5 | pre code { 6 | display: block; padding: 0.5em; 7 | background: #000; color: #f8f8f8; 8 | } 9 | 10 | pre .shebang, 11 | pre .comment, 12 | pre .template_comment, 13 | pre .javadoc { 14 | color: #7c7c7c; 15 | } 16 | 17 | pre .keyword, 18 | pre .tag, 19 | pre .tex .command, 20 | pre .request, 21 | pre .status { 22 | color: #96CBFE; 23 | } 24 | 25 | pre .sub .keyword, 26 | pre .method, 27 | pre .list .title, 28 | pre .nginx .title { 29 | color: #FFFFB6; 30 | } 31 | 32 | pre .string, 33 | pre .tag .value, 34 | pre .cdata, 35 | pre .filter .argument, 36 | pre .attr_selector, 37 | pre .apache .cbracket, 38 | pre .date { 39 | color: #A8FF60; 40 | } 41 | 42 | pre .subst { 43 | color: #DAEFA3; 44 | } 45 | 46 | pre .regexp { 47 | color: #E9C062; 48 | } 49 | 50 | pre .title, 51 | pre .sub .identifier, 52 | pre .pi, 53 | pre .decorator, 54 | pre .tex .special, 55 | pre .haskell .type, 56 | pre .constant, 57 | pre .smalltalk .class, 58 | pre .javadoctag, 59 | pre .yardoctag, 60 | pre .phpdoc, 61 | pre .nginx .built_in { 62 | color: #FFFFB6; 63 | } 64 | 65 | pre .symbol, 66 | pre .ruby .symbol .string, 67 | pre .ruby .symbol .keyword, 68 | pre .ruby .symbol .keymethods, 69 | pre .number, 70 | pre .variable, 71 | pre .vbscript, 72 | pre .literal { 73 | color: #C6C5FE; 74 | } 75 | 76 | pre .css .tag { 77 | color: #96CBFE; 78 | } 79 | 80 | pre .css .rules .property, 81 | pre .css .id { 82 | color: #FFFFB6; 83 | } 84 | 85 | pre .css .class { 86 | color: #FFF; 87 | } 88 | 89 | pre .hexcolor { 90 | color: #C6C5FE; 91 | } 92 | 93 | pre .number { 94 | color:#FF73FD; 95 | } 96 | 97 | pre .tex .formula { 98 | opacity: 0.7; 99 | } 100 | -------------------------------------------------------------------------------- /docs/highlight/styles/magula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Magula style for highligh.js 3 | Author: Ruslan Keba 4 | Website: http://rukeba.com/ 5 | Version: 1.0 6 | Date: 2009-01-03 7 | Music: Aphex Twin / Xtal 8 | */ 9 | 10 | pre code { 11 | display: block; padding: 0.5em; 12 | background-color: #f4f4f4; 13 | } 14 | 15 | pre code, 16 | pre .ruby .subst, 17 | pre .lisp .title { 18 | color: black; 19 | } 20 | 21 | pre .string, 22 | pre .title, 23 | pre .parent, 24 | pre .tag .value, 25 | pre .rules .value, 26 | pre .rules .value .number, 27 | pre .preprocessor, 28 | pre .ruby .symbol, 29 | pre .ruby .symbol .string, 30 | pre .ruby .symbol .keyword, 31 | pre .ruby .symbol .keymethods, 32 | pre .instancevar, 33 | pre .aggregate, 34 | pre .template_tag, 35 | pre .django .variable, 36 | pre .smalltalk .class, 37 | pre .addition, 38 | pre .flow, 39 | pre .stream, 40 | pre .bash .variable, 41 | pre .apache .cbracket { 42 | color: #050; 43 | } 44 | 45 | pre .comment, 46 | pre .annotation, 47 | pre .template_comment, 48 | pre .diff .header, 49 | pre .chunk { 50 | color: #777; 51 | } 52 | 53 | pre .number, 54 | pre .date, 55 | pre .regexp, 56 | pre .literal, 57 | pre .smalltalk .symbol, 58 | pre .smalltalk .char, 59 | pre .change, 60 | pre .tex .special { 61 | color: #800; 62 | } 63 | 64 | pre .label, 65 | pre .javadoc, 66 | pre .ruby .string, 67 | pre .decorator, 68 | pre .filter .argument, 69 | pre .localvars, 70 | pre .array, 71 | pre .attr_selector, 72 | pre .pseudo, 73 | pre .pi, 74 | pre .doctype, 75 | pre .deletion, 76 | pre .envvar, 77 | pre .shebang, 78 | pre .apache .sqbracket, 79 | pre .nginx .built_in, 80 | pre .tex .formula, 81 | pre .input_number { 82 | color: #00e; 83 | } 84 | 85 | pre .keyword, 86 | pre .id, 87 | pre .phpdoc, 88 | pre .title, 89 | pre .built_in, 90 | pre .aggregate, 91 | pre .smalltalk .class, 92 | pre .winutils, 93 | pre .bash .variable, 94 | pre .apache .tag, 95 | pre .xml .tag, 96 | pre .tex .command, 97 | pre .request, 98 | pre .status { 99 | font-weight: bold; 100 | color: navy; 101 | } 102 | 103 | pre .nginx .built_in { 104 | font-weight: normal; 105 | } 106 | 107 | pre .coffeescript .javascript, 108 | pre .xml .css, 109 | pre .xml .javascript, 110 | pre .xml .vbscript, 111 | pre .tex .formula { 112 | opacity: 0.5; 113 | } 114 | 115 | /* --- */ 116 | pre .apache .tag { 117 | font-weight: bold; 118 | color: blue; 119 | } 120 | 121 | -------------------------------------------------------------------------------- /docs/highlight/styles/monokai.css: -------------------------------------------------------------------------------- 1 | /* 2 | Monokai style - ported by Luigi Maselli - http://grigio.org 3 | */ 4 | 5 | pre code { 6 | display: block; padding: 0.5em; 7 | background: #272822; 8 | } 9 | 10 | pre .params .identifier .keymethods { 11 | color: #FD971F; 12 | } 13 | 14 | pre .tag, 15 | pre .tag .title, 16 | pre .keyword, 17 | pre .literal, 18 | pre .change, 19 | pre .winutils, 20 | pre .flow, 21 | pre .lisp .title, 22 | pre .nginx .title, 23 | pre .tex .special { 24 | color: #F92672; 25 | } 26 | 27 | pre code { 28 | color: #DDD; 29 | } 30 | 31 | pre code .constant { 32 | color: #66D9EF; 33 | } 34 | 35 | pre .class .title { 36 | color: white; 37 | } 38 | 39 | pre .attribute, 40 | pre .symbol, 41 | pre .value, 42 | pre .regexp { 43 | color: #BF79DB; 44 | } 45 | 46 | pre .tag .value, 47 | pre .string, 48 | pre .ruby .subst, 49 | pre .title, 50 | pre .haskell .type, 51 | pre .preprocessor, 52 | pre .ruby .instancevar, 53 | pre .ruby .class .parent, 54 | pre .built_in, 55 | pre .sql .aggregate, 56 | pre .django .template_tag, 57 | pre .django .variable, 58 | pre .smalltalk .class, 59 | pre .javadoc, 60 | pre .ruby .string, 61 | pre .django .filter .argument, 62 | pre .smalltalk .localvars, 63 | pre .smalltalk .array, 64 | pre .attr_selector, 65 | pre .pseudo, 66 | pre .addition, 67 | pre .stream, 68 | pre .envvar, 69 | pre .apache .tag, 70 | pre .apache .cbracket, 71 | pre .tex .command, 72 | pre .input_number { 73 | color: #A6E22E; 74 | } 75 | 76 | pre .comment, 77 | pre .java .annotation, 78 | pre .python .decorator, 79 | pre .template_comment, 80 | pre .pi, 81 | pre .doctype, 82 | pre .deletion, 83 | pre .shebang, 84 | pre .apache .sqbracket, 85 | pre .tex .formula { 86 | color: #75715E; 87 | } 88 | 89 | pre .keyword, 90 | pre .literal, 91 | pre .css .id, 92 | pre .phpdoc, 93 | pre .title, 94 | pre .haskell .type, 95 | pre .vbscript .built_in, 96 | pre .sql .aggregate, 97 | pre .rsl .built_in, 98 | pre .smalltalk .class, 99 | pre .diff .header, 100 | pre .chunk, 101 | pre .winutils, 102 | pre .bash .variable, 103 | pre .apache .tag, 104 | pre .tex .special, 105 | pre .request, 106 | pre .status { 107 | font-weight: bold; 108 | } 109 | 110 | pre .coffeescript .javascript, 111 | pre .xml .css, 112 | pre .xml .javascript, 113 | pre .xml .vbscript, 114 | pre .tex .formula { 115 | opacity: 0.5; 116 | } 117 | -------------------------------------------------------------------------------- /docs/highlight/styles/pojoaque.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Pojoaque Style by Jason Tate 4 | http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html 5 | Based on Solarized Style from http://ethanschoonover.com/solarized 6 | 7 | */ 8 | 9 | pre code { 10 | display: block; padding: 0.5em; 11 | color: #DCCF8F; 12 | background: url(./pojoaque.jpg) repeat scroll left top #181914; 13 | } 14 | 15 | pre .comment, 16 | pre .template_comment, 17 | pre .diff .header, 18 | pre .doctype, 19 | pre .lisp .string, 20 | pre .javadoc { 21 | color: #586e75; 22 | font-style: italic; 23 | } 24 | 25 | pre .keyword, 26 | pre .css .rule .keyword, 27 | pre .winutils, 28 | pre .javascript .title, 29 | pre .method, 30 | pre .addition, 31 | pre .css .tag, 32 | pre .lisp .title, 33 | pre .nginx .title { 34 | color: #B64926; 35 | } 36 | 37 | pre .number, 38 | pre .command, 39 | pre .string, 40 | pre .tag .value, 41 | pre .phpdoc, 42 | pre .tex .formula, 43 | pre .regexp, 44 | pre .hexcolor { 45 | color: #468966; 46 | } 47 | 48 | pre .title, 49 | pre .localvars, 50 | pre .function .title, 51 | pre .chunk, 52 | pre .decorator, 53 | pre .builtin, 54 | pre .built_in, 55 | pre .lisp .title, 56 | pre .identifier, 57 | pre .title .keymethods, 58 | pre .id { 59 | color: #FFB03B; 60 | } 61 | 62 | pre .attribute, 63 | pre .variable, 64 | pre .instancevar, 65 | pre .lisp .body, 66 | pre .smalltalk .number, 67 | pre .constant, 68 | pre .class .title, 69 | pre .parent, 70 | pre .haskell .type { 71 | color: #b58900; 72 | } 73 | 74 | pre .css .attribute { 75 | color: #b89859; 76 | } 77 | 78 | pre .css .number,pre .css .hexcolor{ 79 | color: #DCCF8F; 80 | } 81 | 82 | pre .css .class { 83 | color: #d3a60c; 84 | } 85 | 86 | pre .preprocessor, 87 | pre .pi, 88 | pre .shebang, 89 | pre .symbol, 90 | pre .diff .change, 91 | pre .special, 92 | pre .keymethods, 93 | pre .attr_selector, 94 | pre .important, 95 | pre .subst, 96 | pre .cdata { 97 | color: #cb4b16; 98 | } 99 | 100 | pre .deletion { 101 | color: #dc322f; 102 | } 103 | 104 | pre .tex .formula { 105 | background: #073642; 106 | } 107 | -------------------------------------------------------------------------------- /docs/highlight/styles/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jaspersoft/jrs-rest-php-client/32dc45485030c6339e636c309cd5280af6479bf4/docs/highlight/styles/pojoaque.jpg -------------------------------------------------------------------------------- /docs/highlight/styles/school_book.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | School Book style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 15px 0.5em 0.5em 30px; 9 | font-size: 11px !important; 10 | line-height:16px !important; 11 | } 12 | 13 | pre{ 14 | background:#f6f6ae url(./school_book.png); 15 | border-top: solid 2px #d2e8b9; 16 | border-bottom: solid 1px #d2e8b9; 17 | } 18 | 19 | pre .keyword, 20 | pre .literal, 21 | pre .change, 22 | pre .winutils, 23 | pre .flow, 24 | pre .lisp .title, 25 | pre .nginx .title, 26 | pre .tex .special { 27 | color:#005599; 28 | font-weight:bold; 29 | } 30 | 31 | pre code, 32 | pre .ruby .subst, 33 | pre .tag .keyword { 34 | color: #3E5915; 35 | } 36 | 37 | pre .string, 38 | pre .title, 39 | pre .haskell .type, 40 | pre .tag .value, 41 | pre .css .rules .value, 42 | pre .preprocessor, 43 | pre .ruby .symbol, 44 | pre .ruby .symbol .string, 45 | pre .ruby .symbol .keyword, 46 | pre .ruby .symbol .keymethods, 47 | pre .ruby .instancevar, 48 | pre .ruby .class .parent, 49 | pre .built_in, 50 | pre .sql .aggregate, 51 | pre .django .template_tag, 52 | pre .django .variable, 53 | pre .smalltalk .class, 54 | pre .javadoc, 55 | pre .ruby .string, 56 | pre .django .filter .argument, 57 | pre .smalltalk .localvars, 58 | pre .smalltalk .array, 59 | pre .attr_selector, 60 | pre .pseudo, 61 | pre .addition, 62 | pre .stream, 63 | pre .envvar, 64 | pre .apache .tag, 65 | pre .apache .cbracket, 66 | pre .nginx .built_in, 67 | pre .tex .command { 68 | color: #2C009F; 69 | } 70 | 71 | pre .comment, 72 | pre .java .annotation, 73 | pre .python .decorator, 74 | pre .template_comment, 75 | pre .pi, 76 | pre .doctype, 77 | pre .deletion, 78 | pre .shebang, 79 | pre .apache .sqbracket { 80 | color: #E60415; 81 | } 82 | 83 | pre .keyword, 84 | pre .literal, 85 | pre .css .id, 86 | pre .phpdoc, 87 | pre .title, 88 | pre .haskell .type, 89 | pre .vbscript .built_in, 90 | pre .sql .aggregate, 91 | pre .rsl .built_in, 92 | pre .smalltalk .class, 93 | pre .xml .tag .title, 94 | pre .diff .header, 95 | pre .chunk, 96 | pre .winutils, 97 | pre .bash .variable, 98 | pre .apache .tag, 99 | pre .tex .command, 100 | pre .request, 101 | pre .status { 102 | font-weight: bold; 103 | } 104 | 105 | pre .coffeescript .javascript, 106 | pre .xml .css, 107 | pre .xml .javascript, 108 | pre .xml .vbscript, 109 | pre .tex .formula { 110 | opacity: 0.5; 111 | } 112 | -------------------------------------------------------------------------------- /docs/highlight/styles/school_book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jaspersoft/jrs-rest-php-client/32dc45485030c6339e636c309cd5280af6479bf4/docs/highlight/styles/school_book.png -------------------------------------------------------------------------------- /docs/highlight/styles/solarized_dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #002b36; color: #839496; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .diff .header, 15 | pre .doctype, 16 | pre .pi, 17 | pre .lisp .string, 18 | pre .javadoc { 19 | color: #586e75; 20 | font-style: italic; 21 | } 22 | 23 | pre .keyword, 24 | pre .winutils, 25 | pre .method, 26 | pre .addition, 27 | pre .css .tag, 28 | pre .request, 29 | pre .status, 30 | pre .nginx .title { 31 | color: #859900; 32 | } 33 | 34 | pre .number, 35 | pre .command, 36 | pre .string, 37 | pre .tag .value, 38 | pre .phpdoc, 39 | pre .tex .formula, 40 | pre .regexp, 41 | pre .hexcolor { 42 | color: #2aa198; 43 | } 44 | 45 | pre .title, 46 | pre .localvars, 47 | pre .chunk, 48 | pre .decorator, 49 | pre .builtin, 50 | pre .built_in, 51 | pre .identifier, 52 | pre .title .keymethods, 53 | pre .vhdl .literal, 54 | pre .id { 55 | color: #268bd2; 56 | } 57 | 58 | pre .attribute, 59 | pre .variable, 60 | pre .instancevar, 61 | pre .lisp .body, 62 | pre .smalltalk .number, 63 | pre .constant, 64 | pre .class .title, 65 | pre .parent, 66 | pre .haskell .type { 67 | color: #b58900; 68 | } 69 | 70 | pre .preprocessor, 71 | pre .preprocessor .keyword, 72 | pre .shebang, 73 | pre .symbol, 74 | pre .diff .change, 75 | pre .special, 76 | pre .keymethods, 77 | pre .attr_selector, 78 | pre .important, 79 | pre .subst, 80 | pre .cdata { 81 | color: #cb4b16; 82 | } 83 | 84 | pre .deletion { 85 | color: #dc322f; 86 | } 87 | 88 | pre .tex .formula { 89 | background: #073642; 90 | } 91 | -------------------------------------------------------------------------------- /docs/highlight/styles/solarized_light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #fdf6e3; color: #657b83; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .diff .header, 15 | pre .doctype, 16 | pre .pi, 17 | pre .lisp .string, 18 | pre .javadoc { 19 | color: #93a1a1; 20 | font-style: italic; 21 | } 22 | 23 | pre .keyword, 24 | pre .winutils, 25 | pre .method, 26 | pre .addition, 27 | pre .css .tag, 28 | pre .request, 29 | pre .status, 30 | pre .nginx .title { 31 | color: #859900; 32 | } 33 | 34 | pre .number, 35 | pre .command, 36 | pre .string, 37 | pre .tag .value, 38 | pre .phpdoc, 39 | pre .tex .formula, 40 | pre .regexp, 41 | pre .hexcolor { 42 | color: #2aa198; 43 | } 44 | 45 | pre .title, 46 | pre .localvars, 47 | pre .chunk, 48 | pre .decorator, 49 | pre .builtin, 50 | pre .built_in, 51 | pre .identifier, 52 | pre .title .keymethods, 53 | pre .vhdl .literal, 54 | pre .id { 55 | color: #268bd2; 56 | } 57 | 58 | pre .attribute, 59 | pre .variable, 60 | pre .instancevar, 61 | pre .lisp .body, 62 | pre .smalltalk .number, 63 | pre .constant, 64 | pre .class .title, 65 | pre .parent, 66 | pre .haskell .type { 67 | color: #b58900; 68 | } 69 | 70 | pre .preprocessor, 71 | pre .preprocessor .keyword, 72 | pre .shebang, 73 | pre .symbol, 74 | pre .diff .change, 75 | pre .special, 76 | pre .keymethods, 77 | pre .attr_selector, 78 | pre .important, 79 | pre .subst, 80 | pre .cdata { 81 | color: #cb4b16; 82 | } 83 | 84 | pre .deletion { 85 | color: #dc322f; 86 | } 87 | 88 | pre .tex .formula { 89 | background: #eee8d5; 90 | } 91 | -------------------------------------------------------------------------------- /docs/highlight/styles/sunburst.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Sunburst-like style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #000; color: #f8f8f8; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .javadoc { 15 | color: #aeaeae; 16 | font-style: italic; 17 | } 18 | 19 | pre .keyword, 20 | pre .ruby .function .keyword, 21 | pre .request, 22 | pre .status, 23 | pre .nginx .title { 24 | color: #E28964; 25 | } 26 | 27 | pre .function .keyword, 28 | pre .sub .keyword, 29 | pre .method, 30 | pre .list .title { 31 | color: #99CF50; 32 | } 33 | 34 | pre .string, 35 | pre .tag .value, 36 | pre .cdata, 37 | pre .filter .argument, 38 | pre .attr_selector, 39 | pre .apache .cbracket, 40 | pre .date, 41 | pre .tex .command { 42 | color: #65B042; 43 | } 44 | 45 | pre .subst { 46 | color: #DAEFA3; 47 | } 48 | 49 | pre .regexp { 50 | color: #E9C062; 51 | } 52 | 53 | pre .title, 54 | pre .sub .identifier, 55 | pre .pi, 56 | pre .tag, 57 | pre .tag .keyword, 58 | pre .decorator, 59 | pre .shebang, 60 | pre .input_number { 61 | color: #89BDFF; 62 | } 63 | 64 | pre .class .title, 65 | pre .haskell .type, 66 | pre .smalltalk .class, 67 | pre .javadoctag, 68 | pre .yardoctag, 69 | pre .phpdoc { 70 | text-decoration: underline; 71 | } 72 | 73 | pre .symbol, 74 | pre .ruby .symbol .string, 75 | pre .ruby .symbol .keyword, 76 | pre .ruby .symbol .keymethods, 77 | pre .number { 78 | color: #3387CC; 79 | } 80 | 81 | pre .params, 82 | pre .variable { 83 | color: #3E87E3; 84 | } 85 | 86 | pre .css .tag, 87 | pre .rules .property, 88 | pre .pseudo, 89 | pre .tex .special { 90 | color: #CDA869; 91 | } 92 | 93 | pre .css .class { 94 | color: #9B703F; 95 | } 96 | 97 | pre .rules .keyword { 98 | color: #C5AF75; 99 | } 100 | 101 | pre .rules .value { 102 | color: #CF6A4C; 103 | } 104 | 105 | pre .css .id { 106 | color: #8B98AB; 107 | } 108 | 109 | pre .annotation, 110 | pre .apache .sqbracket, 111 | pre .nginx .built_in { 112 | color: #9B859D; 113 | } 114 | 115 | pre .preprocessor { 116 | color: #8996A8; 117 | } 118 | 119 | pre .hexcolor, 120 | pre .css .value .number { 121 | color: #DD7B3B; 122 | } 123 | 124 | pre .css .function { 125 | color: #DAD085; 126 | } 127 | 128 | pre .diff .header, 129 | pre .chunk, 130 | pre .tex .formula { 131 | background-color: #0E2231; 132 | color: #F8F8F8; 133 | font-style: italic; 134 | } 135 | 136 | pre .diff .change { 137 | background-color: #4A410D; 138 | color: #F8F8F8; 139 | } 140 | 141 | pre .addition { 142 | background-color: #253B22; 143 | color: #F8F8F8; 144 | } 145 | 146 | pre .deletion { 147 | background-color: #420E09; 148 | color: #F8F8F8; 149 | } 150 | -------------------------------------------------------------------------------- /docs/highlight/styles/vs.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond 4 | 5 | */ 6 | pre code { 7 | display: block; padding: 0.5em; 8 | } 9 | 10 | pre .comment, 11 | pre .annotation, 12 | pre .template_comment, 13 | pre .diff .header, 14 | pre .chunk, 15 | pre .apache .cbracket { 16 | color: rgb(0, 128, 0); 17 | } 18 | 19 | pre .keyword, 20 | pre .id, 21 | pre .built_in, 22 | pre .smalltalk .class, 23 | pre .winutils, 24 | pre .bash .variable, 25 | pre .tex .command, 26 | pre .request, 27 | pre .status, 28 | pre .nginx .title { 29 | color: rgb(0, 0, 255); 30 | } 31 | 32 | pre .string, 33 | pre .title, 34 | pre .parent, 35 | pre .tag .value, 36 | pre .rules .value, 37 | pre .rules .value .number, 38 | pre .ruby .symbol, 39 | pre .ruby .symbol .string, 40 | pre .ruby .symbol .keyword, 41 | pre .ruby .symbol .keymethods, 42 | pre .instancevar, 43 | pre .aggregate, 44 | pre .template_tag, 45 | pre .django .variable, 46 | pre .addition, 47 | pre .flow, 48 | pre .stream, 49 | pre .apache .tag, 50 | pre .date, 51 | pre .tex .formula { 52 | color: rgb(163, 21, 21); 53 | } 54 | 55 | pre .ruby .string, 56 | pre .decorator, 57 | pre .filter .argument, 58 | pre .localvars, 59 | pre .array, 60 | pre .attr_selector, 61 | pre .pseudo, 62 | pre .pi, 63 | pre .doctype, 64 | pre .deletion, 65 | pre .envvar, 66 | pre .shebang, 67 | pre .preprocessor, 68 | pre .userType, 69 | pre .apache .sqbracket, 70 | pre .nginx .built_in, 71 | pre .tex .special, 72 | pre .input_number { 73 | color: rgb(43, 145, 175); 74 | } 75 | 76 | pre .phpdoc, 77 | pre .javadoc, 78 | pre .xmlDocTag { 79 | color: rgb(128, 128, 128); 80 | } 81 | 82 | pre .vhdl .typename { font-weight: bold; } 83 | pre .vhdl .string { color: #666666; } 84 | pre .vhdl .literal { color: rgb(163, 21, 21); } 85 | pre .vhdl .attribute { color: #00B0E8; } 86 | -------------------------------------------------------------------------------- /docs/highlight/styles/xcode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | XCode style (c) Angel Garcia 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #fff; color: black; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .javadoc, 15 | pre .comment * { 16 | color: rgb(0,106,0); 17 | } 18 | 19 | pre .keyword, 20 | pre .literal, 21 | pre .nginx .title { 22 | color: rgb(170,13,145); 23 | } 24 | pre .method, 25 | pre .list .title, 26 | pre .tag .title, 27 | pre .setting .value, 28 | pre .winutils, 29 | pre .tex .command, 30 | pre .http .title, 31 | pre .request, 32 | pre .status { 33 | color: #008; 34 | } 35 | 36 | pre .envvar, 37 | pre .tex .special { 38 | color: #660; 39 | } 40 | 41 | pre .string { 42 | color: rgb(196,26,22); 43 | } 44 | pre .tag .value, 45 | pre .cdata, 46 | pre .filter .argument, 47 | pre .attr_selector, 48 | pre .apache .cbracket, 49 | pre .date, 50 | pre .regexp { 51 | color: #080; 52 | } 53 | 54 | pre .sub .identifier, 55 | pre .pi, 56 | pre .tag, 57 | pre .tag .keyword, 58 | pre .decorator, 59 | pre .ini .title, 60 | pre .shebang, 61 | pre .input_number, 62 | pre .hexcolor, 63 | pre .rules .value, 64 | pre .css .value .number, 65 | pre .symbol, 66 | pre .ruby .symbol .string, 67 | pre .ruby .symbol .keyword, 68 | pre .ruby .symbol .keymethods, 69 | pre .number, 70 | pre .css .function { 71 | color: rgb(28,0,207); 72 | } 73 | 74 | pre .class .title, 75 | pre .haskell .type, 76 | pre .smalltalk .class, 77 | pre .javadoctag, 78 | pre .yardoctag, 79 | pre .phpdoc, 80 | pre .typename, 81 | pre .tag .attribute, 82 | pre .doctype, 83 | pre .class .id, 84 | pre .built_in, 85 | pre .setting, 86 | pre .params { 87 | color: rgb(92,38,153); 88 | } 89 | 90 | pre .variable { 91 | color: rgb(63,110,116); 92 | } 93 | pre .css .tag, 94 | pre .rules .property, 95 | pre .pseudo, 96 | pre .subst { 97 | color: #000; 98 | } 99 | 100 | pre .css .class, pre .css .id { 101 | color: #9B703F; 102 | } 103 | 104 | pre .value .important { 105 | color: #ff7700; 106 | font-weight: bold; 107 | } 108 | 109 | pre .rules .keyword { 110 | color: #C5AF75; 111 | } 112 | 113 | pre .annotation, 114 | pre .apache .sqbracket, 115 | pre .nginx .built_in { 116 | color: #9B859D; 117 | } 118 | 119 | pre .preprocessor, 120 | pre .preprocessor * { 121 | color: rgb(100,56,32); 122 | } 123 | 124 | pre .tex .formula { 125 | background-color: #EEE; 126 | font-style: italic; 127 | } 128 | 129 | pre .diff .header, 130 | pre .chunk { 131 | color: #808080; 132 | font-weight: bold; 133 | } 134 | 135 | pre .diff .change { 136 | background-color: #BCCFF9; 137 | } 138 | 139 | pre .addition { 140 | background-color: #BAEEBA; 141 | } 142 | 143 | pre .deletion { 144 | background-color: #FFC8BD; 145 | } 146 | 147 | pre .comment .yardoctag { 148 | font-weight: bold; 149 | } 150 | 151 | pre .method .id { 152 | color: #000; 153 | } 154 | -------------------------------------------------------------------------------- /docs/highlight/styles/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | pre code { 9 | display: block; padding: 0.5em; 10 | background: #3F3F3F; 11 | color: #DCDCDC; 12 | } 13 | 14 | pre .keyword, 15 | pre .tag, 16 | pre .css .class, 17 | pre .css .id, 18 | pre .lisp .title, 19 | pre .nginx .title, 20 | pre .request, 21 | pre .status { 22 | color: #E3CEAB; 23 | } 24 | 25 | pre .django .template_tag, 26 | pre .django .variable, 27 | pre .django .filter .argument { 28 | color: #DCDCDC; 29 | } 30 | 31 | pre .number, 32 | pre .date { 33 | color: #8CD0D3; 34 | } 35 | 36 | pre .dos .envvar, 37 | pre .dos .stream, 38 | pre .variable, 39 | pre .apache .sqbracket { 40 | color: #EFDCBC; 41 | } 42 | 43 | pre .dos .flow, 44 | pre .diff .change, 45 | pre .python .exception, 46 | pre .python .built_in, 47 | pre .literal, 48 | pre .tex .special { 49 | color: #EFEFAF; 50 | } 51 | 52 | pre .diff .chunk, 53 | pre .ruby .subst { 54 | color: #8F8F8F; 55 | } 56 | 57 | pre .dos .keyword, 58 | pre .python .decorator, 59 | pre .title, 60 | pre .haskell .type, 61 | pre .diff .header, 62 | pre .ruby .class .parent, 63 | pre .apache .tag, 64 | pre .nginx .built_in, 65 | pre .tex .command, 66 | pre .input_number { 67 | color: #efef8f; 68 | } 69 | 70 | pre .dos .winutils, 71 | pre .ruby .symbol, 72 | pre .ruby .symbol .string, 73 | pre .ruby .symbol .keyword, 74 | pre .ruby .symbol .keymethods, 75 | pre .ruby .string, 76 | pre .ruby .instancevar { 77 | color: #DCA3A3; 78 | } 79 | 80 | pre .diff .deletion, 81 | pre .string, 82 | pre .tag .value, 83 | pre .preprocessor, 84 | pre .built_in, 85 | pre .sql .aggregate, 86 | pre .javadoc, 87 | pre .smalltalk .class, 88 | pre .smalltalk .localvars, 89 | pre .smalltalk .array, 90 | pre .css .rules .value, 91 | pre .attr_selector, 92 | pre .pseudo, 93 | pre .apache .cbracket, 94 | pre .tex .formula { 95 | color: #CC9393; 96 | } 97 | 98 | pre .shebang, 99 | pre .diff .addition, 100 | pre .comment, 101 | pre .java .annotation, 102 | pre .template_comment, 103 | pre .pi, 104 | pre .doctype { 105 | color: #7F9F7F; 106 | } 107 | 108 | pre .coffeescript .javascript, 109 | pre .xml .css, 110 | pre .xml .javascript, 111 | pre .xml .vbscript, 112 | pre .tex .formula { 113 | opacity: 0.5; 114 | } 115 | 116 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ./tests 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Attribute/Attribute.php: -------------------------------------------------------------------------------- 1 | name = $name; 27 | $this->value = $value; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/DTOObject.php: -------------------------------------------------------------------------------- 1 | $v) { 17 | if (!empty($v)) { 18 | $data[$k] = $v; 19 | } 20 | } 21 | return $data; 22 | } 23 | 24 | /** 25 | * Returns string of JSON serialized class data 26 | * 27 | * @return string 28 | */ 29 | public function toJSON() 30 | { 31 | return json_encode($this->jsonSerialize()); 32 | } 33 | 34 | /** 35 | * Get the name of this class if it were a key field in a JSON representation 36 | * 37 | * @param boolean $plural Suffix response with an s? 38 | * @return string 39 | */ 40 | public static function jsonField($plural = false) 41 | { 42 | $field = explode('\\', get_called_class()); 43 | $field = lcfirst(end($field)); 44 | return $plural ? $field . "s" : $field; 45 | } 46 | 47 | /** 48 | * If an object is composed of only properties, this will handle setting those properties as they match their field 49 | * names. If a class expects to have subcomponents or arrays, it should be overridden. 50 | * 51 | * 52 | * @param \stdClass $json_obj A decoded JSON response 53 | * @return mixed Some type of \Jaspersoft\Dto\* object 54 | */ 55 | public static function createFromJSON($json_obj) 56 | { 57 | $source_class = get_called_class(); 58 | $result = new $source_class(); 59 | 60 | foreach ($json_obj as $k => $v) { 61 | if (!empty($v)) { 62 | $result->$k = $v; 63 | } 64 | } 65 | return $result; 66 | } 67 | 68 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Diagnostic/LogCollectorFilter.php: -------------------------------------------------------------------------------- 1 | resource = LogCollectorFilterResource::createFromJSON($json_obj->resource); 18 | return $obj; 19 | } 20 | 21 | public function jsonSerialize() 22 | { 23 | $result = parent::jsonSerialize(); 24 | if (is_a($this->resource, "LogCollectorFilterResource")) { 25 | $result['resource'] = $this->resource->jsonSerialize(); 26 | } 27 | // Internal Server Error if "resource" is set to null 28 | // so we will filter null values for now 29 | return array_filter($result, function($v) { return isset($v); }); 30 | } 31 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Diagnostic/LogCollectorFilterResource.php: -------------------------------------------------------------------------------- 1 | id; 26 | } 27 | 28 | public static function createFromJSON($json_obj) 29 | { 30 | $result = new self(); 31 | $result->id = $json_obj->id; 32 | $result->name = $json_obj->name; 33 | $result->verbosity = $json_obj->verbosity; 34 | $result->filterBy = LogCollectorFilter::createFromJSON($json_obj->filterBy); 35 | return $result; 36 | } 37 | 38 | public function jsonSerialize() 39 | { 40 | $result = parent::jsonSerialize(); 41 | if (is_a($this->filterBy, "\\Jaspersoft\\Dto\\Diagnostic\\LogCollectorFilter")) { 42 | $result['filterBy'] = $this->filterBy->jsonSerialize(); 43 | } 44 | 45 | return $result; 46 | } 47 | 48 | 49 | 50 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Domain/AbstractMetaEntity.php: -------------------------------------------------------------------------------- 1 | properties)) { 21 | $parent->properties = (array) $parent->properties; 22 | } 23 | return $parent; 24 | } 25 | 26 | 27 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Domain/MetaData.php: -------------------------------------------------------------------------------- 1 | rootLevel = MetaLevel::createFromJSON($json_obj->rootLevel); 18 | return $result; 19 | } 20 | 21 | public function jsonSerialize() { 22 | if ($this->rootLevel instanceof MetaLevel) { 23 | return array("rootLevel" => $this->rootLevel->jsonSerialize()); 24 | } else { 25 | throw new DtoException("Unable to serialize MetaData object, invalid rootLevel data."); 26 | } 27 | 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Domain/MetaItem.php: -------------------------------------------------------------------------------- 1 | items)) { 17 | unset($parent->items); 18 | foreach ($json_obj->items as $element) { 19 | $parent->items[] = MetaItem::createFromJSON($element); 20 | } 21 | } 22 | 23 | if (!empty($json_obj->subLevels)) { 24 | unset($parent->subLevels); 25 | foreach ($json_obj->subLevels as $element) { 26 | $parent->subLevels[] = MetaLevel::createFromJSON($element); 27 | } 28 | } 29 | 30 | return $parent; 31 | } 32 | 33 | public function jsonSerialize() 34 | { 35 | $parent = parent::jsonSerialize(); 36 | if (!empty($this->subLevels) && is_array($this->subLevels)) { 37 | unset($parent['subLevels']); 38 | foreach ($this->subLevels as $level) { 39 | if ($level instanceof MetaLevel) { 40 | $parent['subLevels'][] = $level->jsonSerialize(); 41 | } 42 | } 43 | } 44 | 45 | if (!empty($this->items) && is_array($this->items)) { 46 | unset($parent['items']); 47 | foreach ($this->items as $item) { 48 | if ($item instanceof MetaItem) { 49 | $parent['items'][] = $item->jsonSerialize(); 50 | } 51 | } 52 | } 53 | 54 | return $parent; 55 | } 56 | 57 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/ImportExport/ExportTask.php: -------------------------------------------------------------------------------- 1 | $v) { 42 | if (!empty($v) && $v == true) { 43 | $data[$k] = 'true'; 44 | } elseif (!empty($v)) { 45 | $data[$k] = $v; 46 | } 47 | } 48 | return $data; 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/ImportExport/TaskState.php: -------------------------------------------------------------------------------- 1 | id = $id; 41 | $this->phase = $phase; 42 | $this->message = $message; 43 | } 44 | 45 | public static function createFromJSON($json_obj) 46 | { 47 | return new self($json_obj->id, $json_obj->phase, $json_obj->message); 48 | } 49 | 50 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Job/Alert.php: -------------------------------------------------------------------------------- 1 | $v) { 94 | if (isset($v)) { 95 | // Here a special case is handled as the JRS server requires a sublevel 96 | // of address for this attribute in its JSON hierarchy 97 | if ($k == "toAddresses") { 98 | $result[$k] = array("address" => $this->toAddresses); 99 | } 100 | else { 101 | $result[$k] = $v; 102 | } 103 | } 104 | } 105 | return $result; 106 | } 107 | 108 | /** This function takes a \stdClass decoded by json_decode representing a scheduled job 109 | * and casts it as an Alert Object 110 | * 111 | * @param \stdClass $json_obj 112 | * @return Alert 113 | */ 114 | public static function createFromJSON($json_obj) 115 | { 116 | $result = new self(); 117 | if (isset($json_obj->toAddresses)) { 118 | $result->toAddresses = (array) $json_obj->toAddresses->address; 119 | unset($json_obj->toAddresses); 120 | } 121 | foreach ($json_obj as $k => $v) { 122 | $result->$k = $v; 123 | } 124 | return $result; 125 | } 126 | 127 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Job/Calendar/AnnualCalendar.php: -------------------------------------------------------------------------------- 1 | excludeDays[] = $date; 24 | } 25 | 26 | /** 27 | * Add multiple dates to the exclude list 28 | * 29 | * @param array $dates Set of strings in format: YYYY-MM-DD 30 | */ 31 | public function addExcludeDates(array $dates) { 32 | foreach ($dates as $date) { 33 | $this->addExcludeDate($date); 34 | } 35 | } 36 | 37 | /** 38 | * Remove a date from the exclude list 39 | * 40 | * @param string $date YYYY-MM-DD 41 | */ 42 | public function removeExcludeDate($date) { 43 | $key = array_search($date, $this->excludeDays); 44 | if (!($key === False)) { 45 | unset($this->excludeDays[$key]); 46 | $this->excludeDays = array_values($this->excludeDays); 47 | } 48 | } 49 | 50 | /** 51 | * Remove multiple dates from the exclude list 52 | * 53 | * @param array $dates Set of strings in format: YYYY-MM-DD 54 | */ 55 | public function removeExcludeDates(array $dates) { 56 | foreach ($dates as $date) { 57 | $this->removeExcludeDate($date); 58 | } 59 | } 60 | 61 | public static function createFromJSON($json_obj) { 62 | $pre = parent::createFromJSON($json_obj); 63 | // Hide this nesting from user 64 | if (!empty($pre->excludeDays->excludeDay)) { 65 | $pre->excludeDays = $pre->excludeDays->excludeDay; 66 | } 67 | return $pre; 68 | } 69 | 70 | public function jsonSerialize() { 71 | $pre = parent::jsonSerialize(); 72 | // Return hidden nesting for supplying to server 73 | $pre['excludeDays'] = (!empty($pre['excludeDays'])) ? array("excludeDay" => $this->excludeDays) : null; 74 | return $pre; 75 | } 76 | 77 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Job/Calendar/FlaggedCalendar.php: -------------------------------------------------------------------------------- 1 | excludeDaysFlags[] = $day; 26 | } 27 | 28 | /** 29 | * Add multiple dates to the exclude list by number, such that: 30 | * 1 - 31 represent days of the month (for monthly calendar) 31 | * 0 - 6 represent SUN, MON, TUE, WED, THURS, FRI, SAT (SUN = 0, SAT = 6) 32 | * 33 | * @param array $days 34 | */ 35 | public function addExcludeDays(array $days) { 36 | foreach ($days as $day) { 37 | $this->addExcludeDay($day); 38 | } 39 | } 40 | 41 | /** 42 | * Remove a date from the exclude list by number, such that: 43 | * 1 - 31 represent days of the month (for monthly calendar) 44 | * 0 - 6 represent SUN, MON, TUE, WED, THURS, FRI, SAT (SUN = 0, SAT = 6) 45 | * 46 | * @param integer $day 47 | */ 48 | public function removeExcludeDay($day) { 49 | $key = array_search($day, $this->excludeDaysFlags); 50 | if (!($key === False)) { 51 | unset($this->excludeDaysFlags[$key]); 52 | } 53 | } 54 | 55 | /** 56 | * Remove multiple dates from the exclude list by number, such that: 57 | * 1 - 31 represent days of the month (for monthly calendar) 58 | * 0 - 6 represent SUN, MON, TUE, WED, THURS, FRI, SAT (SUN = 0, SAT = 6) 59 | * 60 | * @param array $days 61 | */ 62 | public function removeExcludeDays(array $days) { 63 | foreach ($days as $day) { 64 | $this->removeExcludeDay($day); 65 | } 66 | } 67 | 68 | abstract protected function generateFlagArray(); 69 | 70 | public function jsonSerialize() { 71 | $pre = parent::jsonSerialize(); 72 | if (!empty($this->excludeDaysFlags)) { 73 | $pre['excludeDaysFlags'] = array("excludeDayFlag" => $this->generateFlagArray()); 74 | } 75 | 76 | return $pre; 77 | } 78 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Job/Calendar/HolidayCalendar.php: -------------------------------------------------------------------------------- 1 | 31) { 16 | throw new \DomainException("You must describe days of the month using integers between 1 and 31"); 17 | } 18 | else { 19 | parent::addExcludeDay($day); 20 | } 21 | } 22 | 23 | public function removeExcludeDay($day) 24 | { 25 | if (!is_int($day) || $day < 1 || $day > 31) { 26 | throw new \DomainException("You must describe days of the month using integers between 1 and 31"); 27 | } 28 | else { 29 | parent::removeExcludeDay($day); 30 | } 31 | } 32 | 33 | 34 | protected function generateFlagArray() 35 | { 36 | $flagArray = array_fill(0, MonthlyCalendar::MONTHLY_FILL_INDEX, false); 37 | foreach ($this->excludeDaysFlags as $key) { 38 | $flagArray[$key - 1] = true; 39 | } 40 | return $flagArray; 41 | } 42 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Job/Calendar/WeeklyCalendar.php: -------------------------------------------------------------------------------- 1 | 6) { 22 | throw new \DomainException("You must describe days of the week using integers between 0 and 6"); 23 | } 24 | else { 25 | parent::addExcludeDay($day); 26 | } 27 | } 28 | 29 | public function removeExcludeDay($day) { 30 | if (!is_int($day) || $day < 0 || $day > 6) { 31 | throw new \DomainException("You must describe days of the week using integers between 0 and 6"); 32 | } 33 | else { 34 | parent::removeExcludeDay($day); 35 | } 36 | } 37 | 38 | protected function generateFlagArray() 39 | { 40 | $flagArray = array_fill(0, WeeklyCalendar::WEEKLY_FILL_INDEX, false); 41 | foreach ($this->excludeDaysFlags as $key) { 42 | $flagArray[$key] = true; 43 | } 44 | return $flagArray; 45 | } 46 | 47 | public function jsonSerialize() 48 | { 49 | $pre = parent::jsonSerialize(); 50 | if (!empty($pre->excludeDaysFlags)) { 51 | $pre->excludeDaysFlags = array("excludeDayFlag" => $this->generateFlagArray()); 52 | } 53 | return $pre; 54 | } 55 | 56 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Job/JobState.php: -------------------------------------------------------------------------------- 1 | previousFireTime = $previousFireTime; 37 | $this->nextFireTime = $nextFireTime; 38 | $this->value = $value; 39 | } 40 | 41 | public static function createFromJSON($json_obj) 42 | { 43 | if (!isset($json_obj->previousFireTime)) 44 | $json_obj->previousFireTime = null; 45 | if (!isset($json_obj->nextFireTime)) 46 | $json_obj->nextFireTime = null; 47 | if (!isset($json_obj->value)) 48 | $json_obj->value = null; 49 | 50 | return new self($json_obj->previousFireTime, $json_obj->nextFireTime, $json_obj->value); 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Job/JobSummary.php: -------------------------------------------------------------------------------- 1 | id = strval($id); 19 | $this->label = strval($label); 20 | $this->reportUnitURI = strval($reportUnitURI); 21 | $this->state['value'] = strval($state); 22 | $this->version = strval($version); 23 | $this->owner = strval($owner); 24 | if (!empty($nextFireTime)) { 25 | $this->state['nextFireTime'] = strval($nextFireTime); 26 | } 27 | if (!empty($previousFireTime)) { 28 | $this->state['previousFireTime'] = strval($previousFireTime); 29 | } 30 | } 31 | 32 | public function jsonSerialize() 33 | { 34 | return array( 35 | 'id' => $this->id, 36 | 'version' => $this->version, 37 | 'reportUnitURI' => $this->reportUnitURI, 38 | 'label' => $this->label, 39 | 'owner' => $this->owner, 40 | 'state' => $this->state 41 | ); 42 | } 43 | 44 | } 45 | 46 | ?> -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Job/OutputFTPInfo.php: -------------------------------------------------------------------------------- 1 | $v) { 85 | if (isset($v)) { 86 | $result[$k] = $v; 87 | } 88 | } 89 | return $result; 90 | } 91 | 92 | public static function createFromJSON($json_obj) 93 | { 94 | $result = new self(); 95 | foreach ($json_obj as $k => $v) { 96 | $result->$k = $v; 97 | } 98 | return $result; 99 | } 100 | 101 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Job/RepositoryDestination.php: -------------------------------------------------------------------------------- 1 | $v) { 103 | if (isset($v)) { 104 | if ($k == "outputFTPInfo") { 105 | $result[$k] = $v->jsonSerialize(); 106 | } 107 | else { 108 | $result[$k] = $v; 109 | } 110 | } 111 | } 112 | return $result; 113 | } 114 | 115 | public static function createFromJSON($json_obj) 116 | { 117 | $result = new self(); 118 | if (isset($json_obj->outputFTPInfo)) { 119 | $result->outputFTPInfo = OutputFTPInfo::createFromJSON($json_obj->outputFTPInfo); 120 | unset($json_obj->outputFTPInfo); 121 | } 122 | foreach ($json_obj as $k => $v) { 123 | $result->$k = $v; 124 | } 125 | return $result; 126 | } 127 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Job/SimpleTrigger.php: -------------------------------------------------------------------------------- 1 | occurrenceCount = $occurrenceCount; 32 | $this->recurrenceInterval = $recurrenceInterval; 33 | $this->recurrenceIntervalUnit = $recurrenceIntervalUnit; 34 | } 35 | 36 | public static function createFromJSON($json_obj) 37 | { 38 | $result = new self(); 39 | foreach ($json_obj as $k => $v) { 40 | $result->$k = $v; 41 | } 42 | return $result; 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Job/Source.php: -------------------------------------------------------------------------------- 1 | "value" where value is an array of selected options. 15 | * 16 | * Example: array("Country_multi_select" => array("Mexico", "US", "Bolivia"), "Cascading_name_single_select" => 17 | * array("Engineering Lab", "Architecture Department")) 18 | * 19 | * @var array 20 | */ 21 | public $parameters = array(); 22 | 23 | public function jsonSerialize() 24 | { 25 | $result = array(); 26 | if (!empty($this->reportUnitURI)) { 27 | $result["reportUnitURI"] = $this->reportUnitURI; 28 | } 29 | 30 | if (!empty($this->parameters)) { 31 | $result["parameters"] = array("parameterValues" => $this->parameters); 32 | } 33 | 34 | return $result; 35 | } 36 | 37 | public static function createFromJSON($json_obj) 38 | { 39 | $result = new self(); 40 | foreach ($json_obj as $k => $v) { 41 | if ($k == "parameters" && !empty($v->parameterValues)) { 42 | $result->parameters = (array) $v->parameterValues; 43 | } 44 | else { 45 | $result->$k = $v; 46 | } 47 | } 48 | return $result; 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Job/Trigger.php: -------------------------------------------------------------------------------- 1 | name() => parent::jsonSerialize()); 116 | } 117 | 118 | public static function createFromJSON($json_obj) 119 | { 120 | if (isset($json_obj->simpleTrigger)) { 121 | return SimpleTrigger::createFromJSON($json_obj->simpleTrigger); 122 | } 123 | else if (isset($json_obj->calendarTrigger)) { 124 | return CalendarTrigger::createFromJSON($json_obj->calendarTrigger); 125 | } 126 | else { 127 | //TODO: add proper exception handling 128 | return null; 129 | } 130 | } 131 | 132 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Options/ReportOptions.php: -------------------------------------------------------------------------------- 1 | uri = (!empty($uri)) ? strval($uri) : null; 27 | $this->id = (!empty($id)) ? strval($id) : null; 28 | $this->label = (!empty($label)) ? strval($label) : null; 29 | } 30 | 31 | public static function createFromJSON($json) 32 | { 33 | $data_array = json_decode($json, true); 34 | $result = array(); 35 | foreach ($data_array['reportOptionsSummary'] as $k) { 36 | $result[] = new self($k['uri'], $k['id'], $k['label']); 37 | } 38 | return $result; 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Organization/Organization.php: -------------------------------------------------------------------------------- 1 | alias = $alias; 62 | $this->id = $id; 63 | $this->parentId = $parentId; 64 | $this->tenantName = $tenantName; 65 | $this->theme = $theme; 66 | $this->tenantDesc = $tenantDesc; 67 | $this->tenantFolderUri = $tenantFolderUri; 68 | $this->tenantNote = $tenantNote; 69 | $this->tenantUri = $tenantUri; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Permission/RepositoryPermission.php: -------------------------------------------------------------------------------- 1 | uri = $uri; 30 | $this->recipient = $recipient; 31 | $this->mask = $mask; 32 | } 33 | 34 | public static function createFromJSON($json_data) 35 | { 36 | $perm = json_decode($json_data); 37 | return new self($perm->uri, $perm->recipient, $perm->mask); 38 | } 39 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Report/InputControl.php: -------------------------------------------------------------------------------- 1 | uri = (!empty($uri)) ? strval($uri) : null; 39 | $this->id = (!empty($id)) ? strval($id) : null; 40 | $this->value = (!empty($value)) ? strval($value) : null; 41 | $this->error = (!empty($error)) ? strval($error) : null; 42 | } 43 | 44 | public static function createFromJSON($json) 45 | { 46 | $data_array = json_decode($json, true); 47 | $result = array(); 48 | foreach($data_array['inputControlState'] as $k) { 49 | $temp = @new self($k['uri'], $k['id'], $k['value'], $k['error']); 50 | if (!empty($k['options'])) { 51 | foreach ($k['options'] as $o) { 52 | @$temp->addOption($o['label'], $o['value'], $o['selected']); 53 | } 54 | } 55 | $result[] = $temp; 56 | } 57 | return $result; 58 | } 59 | 60 | private function addOption($label, $value, $selected) 61 | { 62 | $temp = array('label' => strval($label), 'value' => strval($value), 'selected' => $selected); 63 | if($selected == 1) { 64 | $temp['selected'] = 'true'; } else { $temp['selected'] = 'false'; 65 | } 66 | $this->options[] = $temp; 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Report/InputControls/InputControl.php: -------------------------------------------------------------------------------- 1 | state)) { 40 | $parent->state = InputControlState::createFromJSON($parent->state); 41 | } 42 | return $parent; 43 | } 44 | 45 | 46 | 47 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Report/InputControls/InputControlState.php: -------------------------------------------------------------------------------- 1 | options)) { 38 | unset($parent->options); 39 | foreach ($json_obj->options as $option) { 40 | $parent->options[] = (array) $option; 41 | } 42 | } 43 | return $parent; 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/ReportExecution/Attachment.php: -------------------------------------------------------------------------------- 1 | $v) { 57 | if (!empty ($v)) { 58 | if (is_array($v)) { 59 | if ($k == Attachment::jsonField(true)) { 60 | $attachments = array(); 61 | foreach ($v as $attachment) { 62 | $attachments[] = Attachment::createFromJSON($attachment); 63 | } 64 | $result->$k = $attachments; 65 | } 66 | } elseif (is_object($v)) { 67 | if ($k == OutputResource::jsonField()) 68 | $result->$k = OutputResource::createFromJSON($v); 69 | if ($k == Options::jsonField()) 70 | $result->$k = Options::createFromJSON($v); 71 | } else { 72 | $result->$k = $v; 73 | } 74 | } 75 | } 76 | return $result; 77 | } 78 | 79 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/ReportExecution/Export/ExportExecution.php: -------------------------------------------------------------------------------- 1 | outputFinal = (isset($headerSet['output-final']) && $headerSet['output-final'] == "true") ? 'true' : 'false'; 35 | if (isset($headerSet['Content-Disposition'])) { 36 | preg_match('/filename="(.*)"/', $headerSet['Content-Disposition'], $matches); 37 | $result->fileName = end($matches); 38 | } 39 | $result->contentType = (isset($headerSet['Content-Type'])) ? $headerSet['Content-Type'] : null; 40 | 41 | return $result; 42 | } 43 | 44 | 45 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/ReportExecution/Parameter.php: -------------------------------------------------------------------------------- 1 | $this->name, "value" => (array) $this->value); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/ReportExecution/ReportExecution.php: -------------------------------------------------------------------------------- 1 | $v) { 66 | if (is_array($v)) { 67 | if ($k == Export::jsonField(true)) { 68 | $exports = array(); 69 | foreach ($v as $export) { 70 | $exports[] = Export::createFromJSON($export); 71 | } 72 | $result->$k = $exports; 73 | } 74 | } else if (!empty($v)) { 75 | $result->$k = $v; 76 | } 77 | } 78 | return $result; 79 | } 80 | 81 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/ReportExecution/Status.php: -------------------------------------------------------------------------------- 1 | $v) { 33 | if ($k == ErrorDescriptor::jsonField()) { 34 | $result->errorDescriptor = ErrorDescriptor::createFromJSON($v); 35 | } 36 | $result->$k = $v; 37 | } 38 | return $result; 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Resource/AdhocDataView.php: -------------------------------------------------------------------------------- 1 | name()) as $field) { 21 | if (!empty($parent[$field])) { 22 | $parent[$field] = DTOMapper::unmapCollection($parent[$field], $this->name(), $field); 23 | } 24 | } 25 | return $parent; 26 | } 27 | 28 | public static function createFromJSON($json_data, $type = null) 29 | { 30 | $class = self::className(); 31 | $parent = parent::createFromJSON($json_data, get_called_class()); 32 | foreach (DTOMapper::collectionFields($class) as $field) { 33 | if (!empty($parent->$field)) { 34 | $parent->$field = DTOMapper::mapCollection($parent->$field, $class, $field); 35 | } 36 | } 37 | return $parent; 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Resource/CustomDataSource.php: -------------------------------------------------------------------------------- 1 | reportParameters[] = array("name" => $name, "value" => $value); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Resource/ReportUnit.php: -------------------------------------------------------------------------------- 1 | resources)) { 36 | $parent = parent::jsonSerialize(); 37 | $parent_resources = $parent['resources']; 38 | unset($parent['resources']); 39 | $parent['resources']['resource'] = $parent_resources; 40 | return $parent; 41 | } else { 42 | return parent::jsonSerialize(); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Resource/Resource.php: -------------------------------------------------------------------------------- 1 | $v) 23 | $result->$k = $v; 24 | return $result; 25 | } 26 | 27 | public function jsonSerialize() 28 | { 29 | $result = array(); 30 | foreach (get_object_vars($this) as $k => $v) 31 | if (isset($v)) // version errors with !empty 32 | $result[$k] = $v; 33 | return $result; 34 | } 35 | 36 | public function __construct() 37 | { 38 | 39 | } 40 | 41 | public function name() 42 | { 43 | $type = explode('\\', get_class($this)); 44 | $type = lcfirst(end($type)); 45 | return $type; 46 | } 47 | 48 | public static function className() 49 | { 50 | $type = explode('\\', get_called_class()); 51 | $type = lcfirst(end($type)); 52 | return $type; 53 | } 54 | 55 | public function contentType() 56 | { 57 | return "application/repository.".$this->name()."+json"; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Resource/ResourceLookup.php: -------------------------------------------------------------------------------- 1 | $v) { 29 | if (!empty($v)) 30 | $data[$k] = $v; 31 | } 32 | return $data; 33 | } 34 | 35 | public static function createFromJSON($json_data) 36 | { 37 | $temp = new self; 38 | foreach ($json_data as $k => $v) 39 | $temp->$k = $v; 40 | return $temp; 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Resource/SecureMondrianConnection.php: -------------------------------------------------------------------------------- 1 | name = $name; 29 | $this->externallyDefined = $externallyDefined; 30 | $this->tenantId = $tenantId; 31 | } 32 | 33 | public function jsonSerialize() 34 | { 35 | return array( 36 | 'name' => $this->name, 37 | 'externallyDefined' => $this->externallyDefined 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/Thumbnail/ResourceThumbnail.php: -------------------------------------------------------------------------------- 1 | username = $username; 52 | $this->password = $password; 53 | $this->emailAddress = $emailAddress; 54 | $this->fullName = $fullName; 55 | $this->tenantId = $tenantId; 56 | $this->enabled = $enabled; 57 | $this->externallyDefined = $externallyDefined; 58 | $this->previousPasswordChangeTime = $previousPasswordChangeTime; 59 | $this->roles = array(); 60 | } 61 | 62 | public function jsonSerialize() 63 | { 64 | $data = array(); 65 | foreach (get_object_vars($this) as $k => $v) { 66 | if (!empty($v) || $v === false) { 67 | $data[$k] = $v; 68 | } 69 | } 70 | return $data; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/Jaspersoft/Dto/User/UserLookup.php: -------------------------------------------------------------------------------- 1 | username = $username; 31 | $this->fullName = $fullName; 32 | $this->externallyDefined = $externallyDefined; 33 | $this->tenantId = $tenantId; 34 | } 35 | 36 | public function jsonSerialize() 37 | { 38 | return array( 39 | 'username' => $this->username, 40 | 'fullName' => $this->fullName, 41 | 'externallyDefined' => $this->externallyDefined 42 | ); 43 | } 44 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Exception/DtoException.php: -------------------------------------------------------------------------------- 1 | message = $message; 14 | $this->parentException = $parentException; 15 | } 16 | 17 | 18 | 19 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Exception/ResourceServiceException.php: -------------------------------------------------------------------------------- 1 | message = $message; 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Service/Criteria/Criterion.php: -------------------------------------------------------------------------------- 1 | toArray()); 20 | } 21 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Service/Criteria/ReportExecutionSearchCriteria.php: -------------------------------------------------------------------------------- 1 | q = $q; 72 | } 73 | 74 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Service/DomainService.php: -------------------------------------------------------------------------------- 1 | service_url . '/domains'. $domainUri . '/metadata'; 21 | $response = $this->service->prepAndSend($url, array(200), 'GET', null, true); 22 | 23 | return MetaData::createFromJSON(json_decode($response)); 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Service/ImportExportService.php: -------------------------------------------------------------------------------- 1 | service_url . '/export'; 25 | $json_data = $et->toJSON(); 26 | $data = $this->service->prepAndSend($url, array(200), 'POST', $json_data, true, 'application/json', 'application/json'); 27 | return TaskState::createFromJSON(json_decode($data)); 28 | } 29 | 30 | /** 31 | * Retrieve the state of your export request 32 | * 33 | * @param int|string $id task ID 34 | * @return \Jaspersoft\Dto\ImportExport\TaskState 35 | */ 36 | public function getExportState($id) 37 | { 38 | $url = $this->service_url . '/export' . '/' . $id . '/state'; 39 | $data = $this->service->prepAndSend($url, array(200), 'GET', null, true, 'application/json', 'application/json'); 40 | return TaskState::createFromJSON(json_decode($data)); 41 | } 42 | 43 | /** 44 | * Fetch the binary data of the report. This can only be called once before the server recycles the export request 45 | * 46 | * The filename parameter determines the headers sent by the server describing the file. 47 | * 48 | * @param int|string $id 49 | * @param string $filename 50 | * @return string Raw binary data 51 | */ 52 | public function fetchExport($id, $filename = 'export.zip') 53 | { 54 | $url = $this->service_url . '/export' . '/' . $id . '/' . $filename; 55 | $data = $this->service->prepAndSend($url, array(200), 'GET', null, true, 'application/json', 'application/zip'); 56 | return $data; 57 | } 58 | 59 | /** 60 | * Begin an import task 61 | * 62 | * @param \Jaspersoft\Dto\Importexport\ImportTask $it 63 | * @param string $file_data Raw binary data of import zip 64 | * @return \Jaspersoft\Dto\ImportExport\TaskState 65 | */ 66 | public function startImportTask(ImportTask $it, $file_data) 67 | { 68 | $url = $this->service_url . '/import' . '?' . Util::query_suffix($it->queryData()); 69 | $data = $this->service->prepAndSend($url, array(200, 201), 'POST', $file_data, true, 'application/zip', 'application/json'); 70 | return TaskState::createFromJSON(json_decode($data)); 71 | } 72 | 73 | /** 74 | * Obtain the state of an ongoing import task 75 | * 76 | * @param int|string $id 77 | * @return \Jaspersoft\Dto\ImportExport\TaskState 78 | */ 79 | public function getImportState($id) 80 | { 81 | $url = $this->service_url . '/import' . '/' . $id . '/state'; 82 | $data = $this->service->prepAndSend($url, array(200), 'GET', null, true, 'application/json', 'application/json'); 83 | return TaskState::createFromJSON(json_decode($data)); 84 | } 85 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Service/JRSService.php: -------------------------------------------------------------------------------- 1 | service = $client->getService(); 17 | $this->service_url = $client->getURL(); 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Service/OptionsService.php: -------------------------------------------------------------------------------- 1 | service_url . '/reports' . $uri . '/options'; 23 | $data = $this->service->prepAndSend($url, array(200), 'GET', null, true, 'application/json', 'application/json'); 24 | return ReportOptions::createFromJSON($data); 25 | } 26 | 27 | /** 28 | * Update or Create new Report Options. 29 | * 30 | * The argument $controlOptions must be an array in the following form: 31 | * 32 | * array('key' => array('value1', 'value2'), 'key2' => array('value1-2', 'value2-2')) 33 | * 34 | * Note that even when there is only one value, it must be encapsulated within an array. 35 | * 36 | * @param string $uri 37 | * @param array $controlOptions 38 | * @param string $label 39 | * @param boolean $overwrite 40 | * @throws \Jaspersoft\Exception\RESTRequestException 41 | * @return \Jaspersoft\Dto\Options\ReportOptions 42 | */ 43 | public function updateReportOptions($uri, $controlOptions, $label, $overwrite) 44 | { 45 | $url = $this->service_url . '/reports' . $uri . '/options'; 46 | $url .= '?' . Util::query_suffix(array('label' => utf8_encode($label), 'overwrite' => $overwrite)); 47 | $body = json_encode($controlOptions); 48 | $data = $this->service->prepAndSend($url, array(200), 'POST', $body, true, 'application/json', 'application/json'); 49 | $data_array = json_decode($data, true); 50 | return new ReportOptions($data_array['uri'], $data_array['id'], $data_array['label']); 51 | } 52 | 53 | /** 54 | * Remove a pre-existing report options. Provide the URI and Label of the report options you wish to remove. 55 | * this function is limited in its ability to accept labels with whitespace. If you must delete a report option with whitespace 56 | * in the label name, use the deleteResources function instead. Using the URL to the report option. 57 | * 58 | * @param string $uri 59 | * @param string $optionsLabel 60 | * @throws \Jaspersoft\Exception\RESTRequestException 61 | */ 62 | public function deleteReportOptions($uri, $optionsLabel) 63 | { 64 | $url = $this->service_url . '/reports' . $uri . '/options/' . $optionsLabel; 65 | $this->service->prepAndSend($url, array(200), 'DELETE', null, false); 66 | } 67 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Service/QueryService.php: -------------------------------------------------------------------------------- 1 | service_url . '/queryExecutor' . $sourceUri; 22 | $data = $this->service->prepAndSend($url, array(200), 'POST', $query, true, 'text/plain', 'application/json'); 23 | return json_decode($data, true); 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Service/Result/SearchResourcesResult.php: -------------------------------------------------------------------------------- 1 | createItemsFromData($itemData); 35 | $this->resultCount = $resultCount; 36 | $this->startIndex = $startIndex; 37 | $this->totalCount = $totalCount; 38 | } 39 | 40 | public function createItemsFromData($itemData) 41 | { 42 | if ($itemData !== null) { 43 | foreach ($itemData->resourceLookup as $rl) 44 | $this->items[] = ResourceLookup::createFromJSON($rl); 45 | } else { 46 | $this->items = array(); 47 | } 48 | } 49 | 50 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Service/ThumbnailService.php: -------------------------------------------------------------------------------- 1 | service_url . '/thumbnails'; 18 | if (isset($uri)) 19 | { 20 | $result .= $uri; 21 | } 22 | if (isset($defaultAllowed)) { 23 | if (is_bool($defaultAllowed)) { 24 | $defaultAllowedValue = ($defaultAllowed) ? 'true' : 'false'; 25 | $result .= '?defaultAllowed=' . $defaultAllowedValue; 26 | } else { 27 | $result .= '?defaultAllowed=' . $defaultAllowed; 28 | } 29 | } 30 | return $result; 31 | } 32 | 33 | /** 34 | * Obtain a String of a thumbnail encoded in Base64 35 | * 36 | * @param $uri 37 | * @param bool $defaultAllowed 38 | * @return mixed 39 | */ 40 | public function getThumbnailAsBase64String($uri, $defaultAllowed = false) 41 | { 42 | $url = self::makeUrl($uri, $defaultAllowed); 43 | $response = $this->service->makeRequest($url, array(200, 204), 'GET', null, true, 'application/json', 'text/plain'); 44 | 45 | return $response['body']; 46 | } 47 | 48 | /** 49 | * Obtain a thumbnail as binary JPEG data 50 | * 51 | * @param $uri 52 | * @param bool $defaultAllowed 53 | * @return mixed 54 | */ 55 | public function getThumbnailAsJpeg($uri, $defaultAllowed = false) 56 | { 57 | $url = self::makeUrl($uri, $defaultAllowed); 58 | $response = $this->service->makeRequest($url, array(200, 204), 'GET', null, true, 'application/json', 'image/jpeg'); 59 | 60 | return $response['body']; 61 | } 62 | 63 | /** 64 | * Obtain a set of ResourceThumbnail objects representing the thumbnails for several reports, 65 | * these ResourceThumbnail objects will contain the image data as a Base64 String only 66 | * 67 | * @param array $uris 68 | * @param bool $defaultAllowed 69 | * @return array 70 | */ 71 | public function getResourceThumbnails(array $uris, $defaultAllowed = false) 72 | { 73 | $result = array(); 74 | $url = self::makeUrl(); 75 | $postString = Util::query_suffix(array("uri" => $uris, "defaultAllowed" => $defaultAllowed)); 76 | 77 | $response = $this->service->makeRequest($url, array(200), 'POST', $postString, true, 'application/x-www-form-urlencoded'); 78 | $data = json_decode($response['body']); 79 | if (isset($data)) { 80 | foreach ($data as $thumbnail) { 81 | $result[] = ResourceThumbnail::createFromJSON($thumbnail); 82 | } 83 | } 84 | return $result; 85 | } 86 | 87 | 88 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Tool/DTOMapper.php: -------------------------------------------------------------------------------- 1 | array("FIELD" => array("KEY", "VALUE")) 14 | * 15 | * @var array 16 | */ 17 | protected static $collectionKeyValue = array( 18 | "listOfValues" => array("items" => array("label", "value")), 19 | "virtualDataSource" => array("subDataSources" => array("id", "uri")), 20 | "customDataSource" => array("properties" => array("key", "value")), 21 | "semanticLayerDataSource" => array("bundles" => array("locale", "file")), 22 | "reportUnit" => array("resources" => array("name", "file")), 23 | "domainTopic" => array("resources" => array("name", "file")), 24 | "reportOptions" => array("reportParameters" => array("name", "value")) 25 | ); 26 | 27 | public static function collectionKeyValuePair($class, $field) 28 | { 29 | if (array_key_exists($field, static::$collectionKeyValue[$class])) { 30 | return static::$collectionKeyValue[$class][$field]; 31 | } else { 32 | throw new ResourceServiceException("Unable to determine collection unique key"); 33 | } 34 | } 35 | 36 | public static function collectionKey($class, $field) 37 | { 38 | if (array_key_exists($field, static::$collectionKeyValue[$class])) { 39 | return static::$collectionKeyValue[$class][$field][0]; 40 | } else { 41 | throw new ResourceServiceException("Unable to determine collection unique key"); 42 | } 43 | } 44 | 45 | public static function isCollectionField($field, $class) 46 | { 47 | return (isset(static::$collectionKeyValue[$class])) and array_key_exists($field, static::$collectionKeyValue[$class]); 48 | } 49 | 50 | public static function collectionFields($class) 51 | { 52 | return array_keys(static::$collectionKeyValue[$class]); 53 | } 54 | 55 | public static function mapCollection($indexed_array, $class, $field) 56 | { 57 | // To be used with a createFromJSON method 58 | $pair = self::collectionKeyValuePair($class, $field); 59 | 60 | $mapped_array = array(); 61 | foreach ($indexed_array as $item) { 62 | $mapped_array[$item[$pair[0]]] = $item[$pair[1]]; 63 | } 64 | return $mapped_array; 65 | } 66 | 67 | public static function unmapCollection($associative_array, $class, $field) 68 | { 69 | // To be used with jsonSerialize method 70 | $pair = self::collectionKeyValuePair($class, $field); 71 | $unmapped_array = array(); 72 | foreach ($associative_array as $k => $v) { 73 | $unmapped_array[] = array($pair[0] => $k, $pair[1] => $v); 74 | } 75 | return $unmapped_array; 76 | } 77 | 78 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Tool/MimeMapper.php: -------------------------------------------------------------------------------- 1 | "image/*", 9 | "font" => "font/*", 10 | "pdf" => "application/pdf", 11 | "html" => "text/html", 12 | "xls" => "application/xls", 13 | "rtf" => "application/rtf", 14 | "csv" => "text/csv", 15 | "odt" => "application/vnd.oasis.opendocument.text", 16 | "txt" => "text/plain", 17 | "docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", 18 | "ods" => "application/vnd.oasis.opendocument.spreadsheet", 19 | "xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 20 | "jrxml" => "application/jrxml", 21 | "jar" => "application/jar", 22 | "prop" => "application/properties", 23 | "jrtx" => "application/jrtx", 24 | "xml" => "application/xml", 25 | "css" => "text/css", 26 | "accessGrantSchema" => "application/accessGrantSchema", 27 | "olapMondrianSchema" => "application/olapMondrianSchema" 28 | ); 29 | 30 | public static function mapType($jrsType) 31 | { 32 | if (array_key_exists($jrsType, static::$mimeMap)) { 33 | return static::$mimeMap[$jrsType]; 34 | } else { 35 | return $jrsType; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Tool/TestUtils.php: -------------------------------------------------------------------------------- 1 | timezone = "America/Los_Angeles"; 31 | $trigger->startType = 2; 32 | $trigger->startDate = "2025-10-26 10:00"; 33 | $trigger->occurrenceCount = 1; 34 | 35 | // Source 36 | $source = new Source; 37 | $source->reportUnitURI = "/adhoc/topics/Cascading_multi_select_topic"; 38 | $source->parameters = array("Country_multi_select" => array("Mexico"), 39 | "Country_name_single_select" => array("Chin-Lovell Engineering Associates"), 40 | "Country_state_multi_select" => array("DF", "Jalisco", "Mexico")); 41 | 42 | // Repository Destination 43 | $repoDest = new RepositoryDestination; 44 | $repoDest->folderURI = $f->uri; 45 | 46 | $job = new Job("Sample Job Name", $trigger, $source, "Cascading_multi_select_test", 47 | array("PDF", "XLS"), $repoDest); 48 | $job->description = "Sample Description"; 49 | 50 | return $job; 51 | 52 | } 53 | 54 | public static function createFolder() 55 | { 56 | $uuid = self::makeID(); 57 | $entity = new Folder; 58 | $entity->label = "test_" . $uuid; 59 | $entity->description = "test folder"; 60 | $entity->uri = "/test_" . $uuid; 61 | return $entity; 62 | } 63 | 64 | public static function createUser() 65 | { 66 | $timecode = self::makeID(); 67 | 68 | $role = new Role('ROLE_USER', null, 'false'); 69 | 70 | $result = new User(); 71 | $result->username = 'test_' . $timecode; 72 | $result->password = $timecode; 73 | $result->emailAddress = 'test@'.$timecode.'.com'; 74 | $result->fullName = 'User ' . $timecode; 75 | $result->tenantId = 'organization_1'; 76 | $result->enabled = 'true'; 77 | $result->externallyDefined = 'false'; 78 | $result->roles[] = $role; 79 | return $result; 80 | } 81 | 82 | public static function createImage(Folder $f) 83 | { 84 | $uuid = self::makeID(); 85 | $entity = new File(); 86 | $entity->label = "file_" . $uuid; 87 | $entity->description = "test file"; 88 | $entity->uri = $f->uri . "/" . "file_".$uuid; 89 | $entity->type = "img"; 90 | return $entity; 91 | } 92 | 93 | } -------------------------------------------------------------------------------- /src/Jaspersoft/Tool/Util.php: -------------------------------------------------------------------------------- 1 | $v) { 14 | if (is_bool($v)) { 15 | $params[$k] = ($v) ? 'true' : 'false'; 16 | } 17 | } 18 | $url = http_build_query($params, null, '&'); 19 | return preg_replace('/%5B(?:[0-9]|[1-9][0-9]+)%5D=/', '=', $url); 20 | } 21 | 22 | 23 | } -------------------------------------------------------------------------------- /tests/AttributeServiceTest.php: -------------------------------------------------------------------------------- 1 | newUser = u::createUser(); 16 | $this->attr = new Attribute('Gender', 'Robot'); 17 | $this->attr2 = new Attribute('Favorite Beer', 'Anchor Steam'); 18 | 19 | $this->us = $this->jc->userService(); 20 | $this->us->addOrUpdateUser($this->newUser); 21 | 22 | } 23 | 24 | public function tearDown() { 25 | parent::tearDown(); 26 | $this->us->deleteUser($this->newUser); 27 | } 28 | 29 | /* Tests below */ 30 | 31 | /** 32 | * Checks if user's attribute is saved correctly when addOrUpdateAttribute() is called with Attribute parameter, that is 33 | * single Attribute. 34 | */ 35 | public function testPostAttributes_addsOneAttributeData() { 36 | $this->us->addOrUpdateAttribute($this->newUser, $this->attr); 37 | $tempAttr = $this->us->getAttributes($this->newUser); 38 | $tempValue = $tempAttr[0]->value; 39 | $tempName = $tempAttr[0]->name; 40 | 41 | $this->assertEquals('Robot', $tempValue); 42 | $this->assertEquals('Gender', $tempName); 43 | } 44 | 45 | public function testreplaceAttributes() { 46 | $this->us->replaceAttributes($this->newUser, array($this->attr, $this->attr2)); 47 | $attrs = $this->us->getAttributes($this->newUser); 48 | 49 | $this->assertEquals(count($attrs), 2); 50 | } 51 | 52 | /** 53 | * Deleting attributes 54 | */ 55 | public function testDeleteAttribute() { 56 | $this->us->addOrUpdateAttribute($this->newUser, $this->attr); 57 | $count = count($this->us->getAttributes($this->newUser)); 58 | $this->us->deleteAttributes($this->newUser); 59 | $newcount = count($this->us->getAttributes($this->newUser)); 60 | $this->assertEquals(1, $count); 61 | $this->assertEquals($newcount, 0); 62 | } 63 | } 64 | ?> 65 | -------------------------------------------------------------------------------- /tests/BaseTest.php: -------------------------------------------------------------------------------- 1 | bootstrap = parse_ini_file(dirname(__FILE__) . '/test.properties'); 12 | $this->jc = new c( 13 | $this->bootstrap['hostname'], 14 | $this->bootstrap['admin_username'], 15 | $this->bootstrap['admin_password'], 16 | $this->bootstrap['admin_org'] 17 | ); 18 | } 19 | 20 | public function tearDown() { 21 | 22 | } 23 | 24 | public function createSuperClient() 25 | { 26 | $this->jcSuper = new c( 27 | $this->bootstrap['hostname'], 28 | $this->bootstrap['super_username'], 29 | $this->bootstrap['super_password'] 30 | ); 31 | } 32 | 33 | } 34 | 35 | ?> -------------------------------------------------------------------------------- /tests/ImportExportServiceTest.php: -------------------------------------------------------------------------------- 1 | ies = $this->jcSuper->importExportService(); 19 | $this->import_file = file_get_contents( dirname(__FILE__) . '/resources/jasperadmin_import.zip'); 20 | } 21 | 22 | public function tearDown() 23 | { 24 | parent::tearDown(); 25 | } 26 | 27 | public function test_exportService() 28 | { 29 | $task = new ExportTask(); 30 | $task->users[] = "jasperadmin|organization_1"; 31 | $metadata = $this->ies->startExportTask($task); 32 | $state = $this->ies->getExportState($metadata->id); 33 | 34 | $running = true; 35 | while ($running) { 36 | $state = $this->ies->getExportState($metadata->id); 37 | if ($state->phase == "inprogress") 38 | sleep(5); 39 | else 40 | $running = false; 41 | } 42 | 43 | $this->assertEquals("Jaspersoft\\Dto\\ImportExport\\TaskState", get_class($state)); 44 | $this->assertEquals('finished', $state->phase); 45 | $data = $this->ies->fetchExport($metadata->id); 46 | $this->assertTrue(strlen($data) > 100); 47 | unset($data); 48 | } 49 | 50 | public function test_importService() 51 | { 52 | $task = new ImportTask(); 53 | $task->update = true; 54 | $metadata = $this->ies->startImportTask($task, $this->import_file); 55 | $state = $this->ies->getImportState($metadata->id); 56 | 57 | if ($state == "finished") 58 | $running = false; 59 | else 60 | $running = true; 61 | 62 | while ($running) { 63 | $state = $this->ies->getImportState($metadata->id); 64 | if ($state->phase == "inprogress") 65 | sleep(5); 66 | else 67 | $running = false; 68 | } 69 | $this->assertEquals("Jaspersoft\\Dto\\ImportExport\\TaskState", get_class($state)); 70 | $this->assertEquals('finished', $state->phase); 71 | unset($this->import_file); 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /tests/JobsServiceTest.php: -------------------------------------------------------------------------------- 1 | js = $this->jc->jobService(); 23 | $this->rs = $this->jc->repositoryService(); 24 | 25 | $this->testFolder = u::createFolder(); 26 | $this->testJob = u::createJob($this->testFolder); 27 | 28 | $this->rs->createResource($this->testFolder, "/"); 29 | // Update local job object with server's response 30 | $this->testJob = $this->js->createJob($this->testJob); 31 | } 32 | 33 | /** Coverage: deleteJob, deleteResource **/ 34 | public function tearDown() 35 | { 36 | parent::tearDown(); 37 | $this->js->deleteJob($this->testJob->id); 38 | $this->rs->deleteResources($this->testFolder->uri); 39 | } 40 | 41 | /** Coverage: createFromJSON, toJSON 42 | * 43 | * This test ensures that objects created by createFromJSON are identical to the object from which the JSON came 44 | **/ 45 | public function testCreateFromJSON_roundTripPolicy_object() 46 | { 47 | $castedObj = Job::createFromJSON(json_decode($this->testJob->toJSON())); 48 | $this->assertEquals($castedObj, $this->testJob); 49 | } 50 | 51 | /** Coverage: createFromJSON, toJSON 52 | * 53 | * This test ensures that json created by toJSON are identical to the json created by a casted version of the object 54 | **/ 55 | public function testCreateFromJSON_roundTripPolicy_json() 56 | { 57 | $testJob_json = $this->testJob->toJSON(); 58 | $castedJob_json = Job::createFromJSON(json_decode($testJob_json))->toJSON(); 59 | 60 | $this->assertEquals($testJob_json, $castedJob_json); 61 | } 62 | 63 | /** Coverage: searchJobs **/ 64 | public function testPutJob_createsNewJob() 65 | { 66 | $search = $this->js->searchJobs($this->testJob->source->reportUnitURI); 67 | $this->assertTrue(sizeof($search) > 0); 68 | $this->assertEquals($search[0]->label, $this->testJob->label); 69 | } 70 | 71 | /** Coverage: updateJob **/ 72 | public function testUpdateJob_changesJob() 73 | { 74 | $this->testJob->label = "UPDATED_TO_TEST"; 75 | $this->js->updateJob($this->testJob); 76 | $search = $this->js->searchJobs($this->testJob->source->reportUnitURI); 77 | $this->assertEquals($search[0]->label, "UPDATED_TO_TEST"); 78 | } 79 | 80 | /** Coverage: getJob, getJobState **/ 81 | public function testJobState() 82 | { 83 | $jobState = $this->js->getJobState($this->testJob->id); 84 | $this->assertTrue(!empty($jobState->value)); 85 | } 86 | 87 | /** Coverage: pauseJob, getJobState **/ 88 | public function testPauseJob() 89 | { 90 | $this->js->pauseJob($this->testJob->id); 91 | $jobState = $this->js->getJobState($this->testJob->id); 92 | $this->assertEquals("Jaspersoft\\Dto\\Job\\JobState", get_class($jobState)); 93 | $this->assertEquals($jobState->value, "PAUSED"); 94 | } 95 | 96 | /** Coverage: pauseJob, getJobState, resumeJob **/ 97 | public function testResumeJob() 98 | { 99 | self::testPauseJob(); 100 | $this->js->resumeJob($this->testJob->id); 101 | $jobState = $this->js->getJobState($this->testJob->id); 102 | $this->assertEquals("Jaspersoft\\Dto\\Job\\JobState", get_class($jobState)); 103 | $this->assertEquals($jobState->value, "NORMAL"); 104 | } 105 | 106 | 107 | } 108 | 109 | ?> 110 | -------------------------------------------------------------------------------- /tests/OrganizationServiceTest.php: -------------------------------------------------------------------------------- 1 | testOrg = new Organization( 17 | 'testorg', 18 | 'testorg', 19 | 'organization_1', 20 | 'testorg' 21 | ); 22 | 23 | $this->subOrg = new Organization( 24 | 'suborg', 25 | 'suborg', 26 | 'testorg', 27 | 'suborg' 28 | ); 29 | 30 | $this->os = $this->jc->organizationService(); 31 | $this->os->createOrganization($this->testOrg); 32 | $this->os->createOrganization($this->subOrg); 33 | } 34 | 35 | public function tearDown() { 36 | parent::tearDown(); 37 | $this->os->deleteOrganization($this->subOrg); 38 | $this->os->deleteOrganization($this->testOrg); 39 | } 40 | 41 | /* Tests below */ 42 | 43 | public function testPutGetOrganization_withoutSubOrganizationFlag() 44 | { 45 | $result = $this->os->getOrganization($this->testOrg->id); 46 | $this->assertEquals($result->id, $this->testOrg->id); 47 | } 48 | 49 | public function testUpdateOrganization_changesOrganizationData() 50 | { 51 | $this->testOrg->tenantDesc = "TEST_TEST"; 52 | $this->os->updateOrganization($this->testOrg); 53 | $actual = $this->os->getOrganization($this->testOrg->id); 54 | 55 | $this->assertEquals($actual->tenantDesc, "TEST_TEST"); 56 | } 57 | 58 | public function testSearchOrganization() 59 | { 60 | $search = $this->os->searchOrganizations($this->testOrg->id); 61 | $this->assertTrue(sizeof($search) > 0); 62 | $this->assertEquals($search[0]->id, $this->testOrg->id); 63 | } 64 | 65 | } 66 | 67 | ?> -------------------------------------------------------------------------------- /tests/PermissionServiceTest.php: -------------------------------------------------------------------------------- 1 | jcSuper = new Client( 18 | $this->bootstrap['hostname'], 19 | $this->bootstrap['super_username'], 20 | $this->bootstrap['super_password'] 21 | ); 22 | 23 | $this->testFolder = u::createFolder(); 24 | $this->testUser = u::createUser(); 25 | $this->jc->repositoryService()->createResource($this->testFolder, "/", true); 26 | $this->jc->userService()->addOrUpdateUser($this->testUser); 27 | 28 | $this->ps = $this->jc->permissionService(); 29 | $this->us = $this->jc->userService(); 30 | $this->super_ps = $this->jcSuper->permissionService(); 31 | 32 | $this->testPermission = new RepositoryPermission($this->testFolder->uri, "user:/".$this->testUser->tenantId."/".$this->testUser->username, '32'); 33 | } 34 | 35 | public function tearDown() 36 | { 37 | parent::tearDown(); 38 | $this->jc->repositoryService()->deleteResources($this->testFolder->uri); 39 | $this->jc->userService()->deleteUser($this->testUser); 40 | } 41 | 42 | /** Coverage: createRepositoryPermission */ 43 | public function testCreateSinglePermission() 44 | { 45 | $perm = $this->ps->createRepositoryPermission($this->testPermission); 46 | $this->assertEquals($this->testPermission, $perm); 47 | } 48 | 49 | /** Coverage: createRepositoryPermissions, searchRepositoryPermissions **/ 50 | public function testCreateAndGetPermissions() 51 | { 52 | $this->ps->createRepositoryPermissions(array($this->testPermission)); 53 | $search = $this->ps->searchRepositoryPermissions($this->testFolder->uri); 54 | $this->assertEquals(sizeof($search), 1); 55 | $this->assertEquals($search[0]->mask, 32); 56 | } 57 | 58 | /** Coverage: create, search, updateRepositoryPermissions **/ 59 | public function testUpdatePermission() 60 | { 61 | self::testCreateAndGetPermissions(); 62 | $this->testPermission->mask = 1; 63 | $this->ps->updateRepositoryPermissions($this->testFolder->uri, array($this->testPermission)); 64 | $search = $this->ps->searchRepositoryPermissions($this->testFolder->uri); 65 | $this->assertEquals(sizeof($search), 1); 66 | $this->assertEquals($search[0]->mask, 1); 67 | } 68 | /** Coverage: create, search, deleteRepositoryPermissions **/ 69 | public function testDeletePermission() 70 | { 71 | self::testCreateAndGetPermissions(); 72 | $this->ps->deleteRepositoryPermission($this->testPermission); 73 | $search = $this->ps->searchRepositoryPermissions($this->testFolder->uri); 74 | $this->assertEquals(sizeof($search), 0); 75 | } 76 | 77 | } 78 | 79 | ?> 80 | -------------------------------------------------------------------------------- /tests/QueryExecutorTest.php: -------------------------------------------------------------------------------- 1 | qs = $this->jc->queryService(); 15 | $this->query = << 17 | 18 | 19 | 20 | 21 | 22 | EOF; 23 | 24 | } 25 | 26 | public function tearDown() { 27 | parent::tearDown(); 28 | } 29 | 30 | public function testQueryExecution() { 31 | $run = $this->qs->executeQuery('/Domains/Simple_Domain', $this->query); 32 | // If data is set, then data was collected and the requst was successful 33 | $this->assertTrue(isset($run['values'][0]['value'][0])); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tests/ReportOptionsTest.php: -------------------------------------------------------------------------------- 1 | os = $this->jc->optionsService(); 14 | $this->report_uri = '/reports/samples/Cascading_multi_select_report'; 15 | $this->testSuccess = false; 16 | } 17 | 18 | public function tearDown() { 19 | parent::tearDown(); 20 | $this->testSuccess = false; 21 | } 22 | 23 | /** 24 | * Does a non-strict sanity check on ReportOptions service. 25 | */ 26 | public function testCreateOptions_CreatesNewOptions() { 27 | $timecode = substr(md5(microtime()), 0, 5); 28 | $label = 'test' . $timecode; 29 | $controlOptions = array('Country_multi_select' => array('USA')); 30 | $this->os->updateReportOptions($this->report_uri, $controlOptions, $label, 'true'); 31 | $options = $this->os->getReportOptions($this->report_uri); 32 | foreach($options as $o) { 33 | if ($o->label == $label) { 34 | $this->testSuccess = true; 35 | } 36 | } 37 | $this->os->deleteReportOptions($this->report_uri, $label); 38 | $this->assertTrue($this->testSuccess); 39 | } 40 | 41 | 42 | 43 | } 44 | ?> -------------------------------------------------------------------------------- /tests/RoleServiceTest.php: -------------------------------------------------------------------------------- 1 | newUser = u::createUser(); 20 | $this->rs = $this->jc->roleService(); 21 | $this->newRole = new Role( 22 | 'NOT_A_REAL_ROLE', 'organization_1'); 23 | $this->rs->createRole($this->newRole); 24 | } 25 | 26 | /** Coverage: deleteRole **/ 27 | public function tearDown() { 28 | parent::tearDown(); 29 | $this->rs->deleteRole($this->newRole); 30 | } 31 | 32 | /* Tests below */ 33 | 34 | /** Coverage: updateRole, getRole **/ 35 | public function testUpdateRole() 36 | { 37 | $oldName = $this->newRole->name; 38 | $this->newRole->name = "ROLE_QA"; 39 | $this->rs->updateRole($this->newRole, $oldName); 40 | $actual = $this->rs->getRole($this->newRole->name, $this->newRole->tenantId); 41 | $this->assertEquals($this->newRole->name, $actual->name); 42 | $this->newRole->name = $oldName; 43 | $this->rs->updateRole($this->newRole, "ROLE_QA"); 44 | } 45 | 46 | /** Coverage: searchRoles **/ 47 | public function testsearchRoles() 48 | { 49 | $roleCount = sizeof($this->rs->searchRoles()); 50 | $this->assertTrue($roleCount > 2); 51 | } 52 | 53 | } 54 | 55 | ?> 56 | -------------------------------------------------------------------------------- /tests/ServerInfoTest.php: -------------------------------------------------------------------------------- 1 | jc->serverInfo(); 22 | $this->assertTrue(isset($info['version'])); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tests/UserServiceTest.php: -------------------------------------------------------------------------------- 1 | newUser = u::createUser(); 18 | $this->us = $this->jc->userService(); 19 | $this->us->addOrUpdateUser($this->newUser); 20 | } 21 | 22 | public function tearDown() 23 | { 24 | parent::tearDown(); 25 | $this->us->deleteUser($this->newUser); 26 | } 27 | 28 | public function testGetUser_GetsCorrectUser() 29 | { 30 | $actual = $this->us->getUser($this->newUser->username, $this->newUser->tenantId); 31 | $this->assertEquals($this->newUser->fullName, $actual->fullName); 32 | } 33 | 34 | public function testUpdate_ChangesUser() 35 | { 36 | $this->newUser->emailAddress = "test@test.test"; 37 | $this->us->addOrUpdateUser($this->newUser); 38 | 39 | $actual = $this->us->getUser($this->newUser->username, $this->newUser->tenantId); 40 | $this->assertEquals("test@test.test", $actual->emailAddress); 41 | } 42 | 43 | public function testSearchUser_ReturnsAUser() 44 | { 45 | $result = $this->us->searchUsers($this->newUser->username); 46 | $this->assertTrue(sizeof($result) > 0); 47 | $this->assertTrue($result[0] instanceof UserLookup); 48 | } 49 | 50 | public function testGetUserByLookup_ReturnsCorrectUser() 51 | { 52 | $result = $this->us->searchUsers($this->newUser->username); 53 | $user = $this->us->getUserByLookup($result[0]); 54 | $this->assertEquals($user->username, $this->newUser->username); 55 | } 56 | 57 | } 58 | 59 | ?> -------------------------------------------------------------------------------- /tests/resources/jasperadmin_import.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jaspersoft/jrs-rest-php-client/32dc45485030c6339e636c309cd5280af6479bf4/tests/resources/jasperadmin_import.zip -------------------------------------------------------------------------------- /tests/resources/pitbull.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jaspersoft/jrs-rest-php-client/32dc45485030c6339e636c309cd5280af6479bf4/tests/resources/pitbull.jpg -------------------------------------------------------------------------------- /tests/test.properties: -------------------------------------------------------------------------------- 1 | hostname = "http://localhost:8080/jasperserver-pro" 2 | admin_username = "jasperadmin" 3 | admin_password = "jasperadmin" 4 | admin_org = "organization_1" 5 | super_username = "superuser" 6 | super_password = "superuser" 7 | --------------------------------------------------------------------------------