To get full access to the Kademi Hub existing customers can login here, or new customers can register here.
Base class for pretty much all resources
Implements: CommonResource, PropFindableResource, AccessControlledResource, ReportableResource, LockableResource, OAuth2Resource
Properties
| Name | Returns | Notes |
|---|---|---|
| accessControlList | Map<Principal,List<Priviledge>> | |
| asList | ResourceList | |
| attributes | Map<String,Object> | |
| createDate | Date | Returns null, but may be overridden in other classes |
| dir | boolean | True iff this resource is a collection |
| href | String | The path to the resource within the website |
| link | String | Returns a HTML link to this resource, with its name as the text of the link |
| modifiedDate | Date | Returns null, but may be overridden in other classes |
| oAuth2Providers | Map<String,OAuth2Provider> | |
| path | Path | Returns the path to the resource as a Path object, which has convenient methods for path manipulation |
| principalCollectionHrefs | HrefList | Return the hrefs (either fully qualified URLs or absolute paths) to the collections which contain principals. This is to allow user agents to display a list of users to display. Most implementations will only have a single value which will be the path to the users folder. Eg: return Arrays.asList("/users/"); |
| principalURL | String | Returns the path to the owner of this resource, if there is a particular owner. Otherwise returns null |
| public | boolean | Returns false |
| readable | boolean | Is the resource readable by the current user (which might be null for anonymous request) |
| realm | String | |
| uniqueId | String | |
| writable | boolean | True if the current user has WRITE_CONTENT permission on this resource |
Methods
| Signature | Returns | Notes |
|---|---|---|
find(String path) | Resource | Find a resource within the website by its path. If the given path is relative it will be evaluated relative to this resource. If absolute it will be evaluated from the website root |
find(Path p) | Resource | Find a resource by a path using a Path object |
closest(String type) | CommonResource | Find the closest parent (or this resource) which is the current type, ie where parent.is(type) == true |
closest(Class<T> c) | T | Find the closest parent with the given class |