Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.attach("/contacts", contactListRestlet); // To list all contacts
- this.attach("/contacts/{uid}", contactRestlet); // To show details about a specific contact
- this.attach("/contacts/similar", similarRestlet, Template.MODE_EQUALS);
- this.attach("/contact/photo/{uid}", photoRestlet); // {uid} must correspond to a valid raw contact id
- this.attach("/contact/photo/{uid}/thumbnail", photoThumbnailRestlet);
- this.attach("/import/file", fileImportRestlet);
- this.attach("/echo", echoRestlet);
- this.attach("/echo/file", echoFileRestlet);
- this.attach("/import/vcard", importVcard);
- this.attach("/logout", logoutRestlet);
- final String ROOT_URI = "file:///android_asset";
- Application application = new Application() {
- @Override
- public Restlet createInboundRoot() {
- //ForAssets
- DirectoryForAssets d = new DirectoryForAssets(getContext(), ROOT_URI);
- d.setTargetClass(DirectoryResourceExtension.class);
- d.setAndroidContext(context);
- return d;
- }
- };
- this.attach("/editor", application, Template.MODE_STARTS_WITH);
- this.attach("/contacts/similar", similarRestlet);
- this.attach("/contacts", contactListRestlet); // To list all contacts
- this.attach("/contacts/{uid}", contactRestlet); // To show details about a specific contact
- this.attach("/contact/photo/{uid}", photoRestlet); // {uid} must correspond to a valid raw contact id
- this.attach("/contact/photo/{uid}/thumbnail", photoThumbnailRestlet);
- this.attach("/import/file", fileImportRestlet);
- this.attach("/echo", echoRestlet);
- this.attach("/echo/file", echoFileRestlet);
- this.attach("/import/vcard", importVcard);
- this.attach("/logout", logoutRestlet);
- final String ROOT_URI = "file:///android_asset";
- Application application = new Application() {
- @Override
- public Restlet createInboundRoot() {
- //ForAssets
- DirectoryForAssets d = new DirectoryForAssets(getContext(), ROOT_URI);
- d.setTargetClass(DirectoryResourceExtension.class);
- d.setAndroidContext(context);
- return d;
- }
- };
- this.attach("/editor", application, Template.MODE_STARTS_WITH);
- "/contacts/{uid}"
- "/contacts/similar"
- "/contacts/similar"
- "/contacts/{uid}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement