package com.perforce.hwsclient; @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-06-17T14:20:41.291+01:00") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). * * @param array The array * @param value The value to search * @return true if the array contains the value */ public static boolean containsIgnoreCase(String[] array, String value) { for (String str : array) { if (value == null && str == null) return true; if (value != null && value.equalsIgnoreCase(str)) return true; } return false; } /** * Join an array of strings with the given separator. * <p> * Note: This might be replaced by utility method from commons-lang or guava someday * if one of those libraries is added as dependency. * </p> * * @param array The array of strings * @param separator The separator * @return the resulting string */ public static String join(String[] array, String separator) { int len = array.length; if (len == 0) return ""; StringBuilder out = new StringBuilder(); out.append(array[0]); for (int i = 1; i < len; i++) { out.append(separator).append(array[i]); } return out.toString(); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#9 | 19734 | swellard | Login - docs and tweak to server login api | ||
#8 | 19725 | swellard | Remove the need to pass LoginRequest to login call | ||
#7 | 19655 | drobins | Wrap the retrofit exception in a perforce client one | ||
#6 | 19642 | swellard | Swagger code gen change method names | ||
#5 | 19634 | swellard | Swagger codegen - fix equals | ||
#4 | 19628 | swellard | Make ApiClient easier to read | ||
#3 | 19611 | swellard | Refactor REST path - make version namespace specific | ||
#2 | 19597 | swellard | Refactor REST path | ||
#1 | 19553 | swellard | Move and rename clients | ||
//guest/perforce_software/helix-web-services/main/source/clients/2016.1.0/java/src/main/java/com/perforce/hwsclient/StringUtil.java | |||||
#1 | 19535 | drobins | Refactor package names to hws | ||
//guest/perforce_software/helix-web-services/main/source/clients/2016.1.0/java/src/main/java/com/perforce/helix_web_services_client/StringUtil.java | |||||
#13 | 19399 | tjuricek |
Upgrade to spark 2.5 which requires a different path for the version information. Spark 2.5's static file matching seems to conflict with just using the "/api" path since a "/publicsite/api" directory actually exists. You end up with a 500 error (NPE exception) if you attempt to map that path. Also, disable the failing RPM test for now. |
||
#12 | 19202 | tjuricek | Revised documentation for the Ruby Client SDK; removed obsolete methods and definitions, and restyled a lot of the tables. | ||
#11 | 19169 | tjuricek | JavaScript Client SDK jobs CRUD test, with supprt for "additionalProperties" in the swagger definition. | ||
#10 | 19098 | tjuricek |
JavaScript Client SDK labels spec CRUD tests. Identified another parameter naming conflict, which only pops up in the javaScript client because I didn't choose to automatically rename parameters for people. (I don't think it's a good idea to just say "label0", "label1", etc., especially when they're different types.) |
||
#9 | 19002 | tjuricek |
Improve API to interact with multiple p4ds. The configuration now requires an explicit setting of what P4Ds HWS can talk to via the 'P4D config dir', where there's a file indicating connection settings per p4d, and importantly, an ID. This is the "server ID" referenced everywhere. Most methods now require a server ID to indicate which p4d to manipulate. In the future, it's likely we will interact with *multiple* p4d instances on some services. This completely removes the ability to run HWS as a kind of an "open proxy" to whatever p4d you want. Given the nature of the change and the lack of priority, we've removed Helix Cloud testing and disabled several methods from their "Helix Cloud" implementation. These will be relatively easy to bring back, we'll just need a new method from Raymond that lists the "allowed server IDs" that map to the HWS configured server IDs for a particular user. Another notable aspect of this change is the use of JSON Web Token to create our authentication key. We associate this key with an in-memory "session" that contains the P4D tickets we use to authenticate users. The JWT token, by default, is assigned a timeout, which allows HWS to block further access to underlying servers without having to interact with multiple auth backends. If any backend fails with that session, the user will get a 403. If you disable the timeout, you'll need to ensure your clients clear out sessions. |
||
#8 | 18905 | tjuricek |
Add Git Fusion environent configuration and testing, and altered the implementation to use the newly defined API. Note: only runs on linux. We use latest GF production for testing and GF packages are linux only. The "integration" is pretty "light" at this point. This does require the test machine to have our package repository setup. |
||
#7 | 18879 | tjuricek |
Add '-m' and '-a' filtering options on user list. Also, the Ruby client SDK needed to override the .gemspec template. |
||
#6 | 18877 | tjuricek | Revise the 'Jobview' field of user specs to just be a string instead of an array, add basic testing. | ||
#5 | 18850 | tjuricek | Add the ability to fix jobs in the web API, which we can use to verify the jobs association with changelists. | ||
#4 | 18803 | tjuricek |
Allow for a simple "p4d configuration" mechanism to setup a way for multiple p4ds to be used without having to provide settings like P4PORT, etc via headers. Right now, you'd set P4DCONFIGDIR to a local directory, and the provide a P4DID either as a default in the configuration or via a header. I didn't include it in the path or query parameters, because then it would have been required by clients on *every method call* which seemed like the wrong approach. Most clients will interop primarily with a single server, so creating a client object per server didn't seem ridiculous. |
||
#3 | 18802 | tjuricek | Rename '/listing' to '/paths', to sound more resource-centric. | ||
#2 | 18798 | tjuricek |
Report supported platform versions in the default request, if we accept application/json. Added a method to the Java client SDK to check if it's a supported version. |
||
#1 | 18795 | tjuricek | Use point-release versioning for the client SDKs and installers. | ||
//guest/perforce_software/helix-web-services/main/source/clients/2016.1/java/src/main/java/com/perforce/helix_web_services_client/StringUtil.java | |||||
#21 | 18788 | tjuricek | Correct references to URL paths in asciidoc and add minor release number to default version string. | ||
#20 | 18786 | tjuricek | Prefix all paths with /api, and remove <, > characters in documentation which breaks javaDoc at the moment. | ||
#19 | 18785 | tjuricek | Revise the git fusion repository models. | ||
#18 | 18783 | tjuricek | Alter the "paths" resource to include fstat and content when specifying a single file instead of a directory. | ||
#17 | 18768 | tjuricek | Convert depot-related methods, and change the "listing" resource to a "paths" resource, and maybe help simplify the Location concept. | ||
#16 | 18766 | tjuricek | Convert trigger-related models. | ||
#15 | 18765 | tjuricek | Convert stream-related models | ||
#14 | 18757 | tjuricek | Convert server-related models. | ||
#13 | 18746 | tjuricek | Convert protections-related models, along with updating documentation around login and projects. | ||
#12 | 18741 | tjuricek |
Remove documentation line that used double-quotes. Seems to cause problems on windows, and doesn't really fit the API docs. |
||
#11 | 18738 | tjuricek | Convert label-related models. | ||
#10 | 18737 | tjuricek | Ensure that checking if the system is OK does just returns false if the server isn't running, instead of throwing an exception. | ||
#9 | 18732 | tjuricek | Convert job-related models. | ||
#8 | 18727 | tjuricek | Convert the status method to be part of the documented API, and convert the login-related models. | ||
#7 | 18726 | tjuricek |
Revise group models to mirror command output. I noticed the property capitalization wasn't following conventions for users, so I changed that here as well. |
||
#6 | 18722 | tjuricek | Convert user-related models to be command-oriented. | ||
#5 | 18713 | tjuricek | Converted counter related models. | ||
#4 | 18712 | tjuricek | Converted client-related command models. | ||
#3 | 18710 | tjuricek |
Convert change-related command models to our client API models, also, complete the "alpha" tagging of methods. This consolidates models related to creating changelists to come from the Java client SDK version. We are now tagging various methods as "alpha" to signify they may break in upcoming versions. This allows new features to have a period where they can be available, but not necessarily need to be supported in upcoming releases. |
||
#2 | 18700 | tjuricek |
Convert branch-related models, which includes CommandResponse, and framework for doing model conversion to/from our P4Java input maps. Dates are fun. Those are now being converted using the "tzoffset" from the server query. |
||
#1 | 18679 | tjuricek |
Revising HWS paths to work primarily at product version 2016.1. The swagger definitions will primarily work at a major platform release number. We will generate new clients for each major release, and ensure backwards compatibility as time goes on by keeping the older clients around in the tree. Note: These are JUST URLs, and do not include other revisions we plan on making shortly. |
||
//guest/perforce_software/helix-web-services/main/source/clients/java/src/main/java/com/perforce/helix_web_services_client/StringUtil.java | |||||
#8 | 18605 | tjuricek |
Document a simplified method for obtaining the Java client SDK handle. The client SDK is included as a part of the distribution. Javadoc is included in a subdirectory and hosted directly. A stupid simple HTML page was added by default to give people something to access right after installation. |
||
#7 | 18585 | tjuricek | Adding JavaDoc reference for client libraries to package distributions. | ||
#6 | 18555 | tjuricek | Added Java client libraries to installation, along with swagger source. | ||
#5 | 18551 | tjuricek |
Switch to using swagger-based HTTP methods. Remove old java_client. The swagger documentation generates asciidoc, which is included in the current user guide. We lose some control over the formatting. |
||
#4 | 18524 | tjuricek |
Add a "trust everything" mode to the generated Java client for testing our installed packages. Also, check in the client's dependencies as well via our "vendor" declarations. It's unclear how we'll distribute the client SDK code, probably as a group of jar files. We'll see. |
||
#3 | 18522 | tjuricek | Increase the compiler level to 1.8 | ||
#2 | 18515 | tjuricek |
Replacing java_client with Swagger-based clients/java project. - Switched implementations of the Swagger client to use okhttp with gson. - Added the version to the "status" method, and hey, added that method to the spec - Added templates to the java code generator to add some default methods, fixing some import issues in Gradle NOTE: We may want to break down the API a bit and restructure it. |
||
#1 | 18488 | tjuricek |
Swagger Java client (initial version). This contains a basic configuration for the java client, which mostly decides package location, etc. Notably, the license must be ASL under the SmartBear copyright. |