Git Product home page Git Product logo

restfulie-java's People

Contributors

acdesouza avatar adrianoalmeida7 avatar cairesvs avatar caueguerra avatar guilhermesilveira avatar josedonizetti avatar lucascs avatar orthographic-pedant avatar rafaelrviana avatar rhaiger avatar rodolfoliviero avatar samuelportela avatar victorkendy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

restfulie-java's Issues

allow state definition through another component

In order to... define all possible states and transitions
I want to... allow the user to define a method which "builds" states and returns a list of them so restfulie can allow/block transition transit while executing it:

i.e.:

public List<State> getStates(Restfulie control) {
    control.state("unpaid").allow("cancel");
    return control.getStates();

//
control.state("ready").allow("receive").when(new InventoryAvailabilityOnTheNetwork());
new Dependency() {
public boolean allows(Order order) {
//return order.getStatus()=="payed" && order.getPaymentTime()<1minute;
return true;
}

            })
}

chooing media type when following a link

when following a link the precedence of choosing an media type is:

1 - the user itself provide it
2 - if the link has provided an media-type it should be used
3 - use the same as the last request

doc page

migrate doc pages to javadoc and simple README

package-scan for @XStreamAlias

client should package-scan for classes with @XStreamAlias, and registar ir automatically at the json and xml mediay types, this feature must have an way to be disabled.

Support dynamic results

Results should not be unmarshalled by default.
Unmarshalling can also be done to some generic entities instead of direct linkage.

caracter truncation on post data

client code with charset on content type likes

restfulie
.at("http://localhost:8081/faturamento/boleto/create")
.as("application/xml;charset=utf-8").accept("application/xml").post(object)

generates an exception

Exception in thread "main" br.com.caelum.restfulie.RestfulieException: Unsupported media type 'application/xml;charset=utf-8'
at br.com.caelum.restfulie.mediatype.MediaTypes.forContentType(MediaTypes.java:27)
at br.com.caelum.restfulie.http.apache.ApacheDispatcher.handlerFor(ApacheDispatcher.java:92)
at br.com.caelum.restfulie.http.apache.ApacheDispatcher.process(ApacheDispatcher.java:73)
at br.com.caelum.restfulie.request.RequestStack.process(RequestStack.java:38)
at br.com.caelum.restfulie.request.RequestChain.next(RequestChain.java:20)
at br.com.caelum.restfulie.request.RequestStack.process(RequestStack.java:29)
at br.com.caelum.restfulie.http.DefaultHttpRequest.sendPayload(DefaultHttpRequest.java:43)
at br.com.caelum.restfulie.http.DefaultHttpRequest.post(DefaultHttpRequest.java:98)
at br.com.jslsolucoes.faturamento.service.impl.FaturamentoRestServiceImpl.create(FaturamentoRestServiceImpl.java:73)
at br.com.jslsolucoes.faturamento.service.impl.FaturamentoRestServiceImpl.main(FaturamentoRestServiceImpl.java:28)

without charset type works fine but truncate acentuation os server side

nicer 404 error message when GETting resource

when you do a GET for an inexistant resource and the server answers with a 404, it's raising a FileNotFoundException from java.net.http lib.

It'd be better to have nicer message and error handling.

Stable or Stale?

Hey guys,
there is no commit here for a very long time, is this because the project is stable of because nobody has interest on it anymore?

enhancing EnhancedList doesn't work on Servlet environments

 java.lang.IllegalStateException: Unable to extend type br.com.caelum.restfulie.mediatype.EnhancedList
at br.com.caelum.restfulie.relation.Enhancer.enhanceResource(Enhancer.java:24)
at br.com.caelum.restfulie.mediatype.XStreamHelper.getXStream(XStreamHelper.java:120)
at br.com.caelum.restfulie.mediatype.JsonMediaType.<init>(JsonMediaType.java:33)
at br.com.caelum.restfulie.http.DefaultRestClient.<init>(DefaultRestClient.java:55)
at br.com.caelum.restfulie.Restfulie.custom(Restfulie.java:45)
at br.com.caelum.vraptor.blank.IndexController.index(IndexController.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:61)
... 37 more

Caused by: javassist.NotFoundException: br.com.caelum.restfulie.mediatype.EnhancedList
at javassist.ClassPool.get(ClassPool.java:436)
at br.com.caelum.restfulie.relation.Enhancer.enhanceResource(Enhancer.java:18)
... 47 more

Rest process

Support java process modelling on the client side

conneg fallback

If conneg is not requesting anything, serve the first registered representation.

allow context "case/if" execution

In order to... set when an operation should be executed or not (etag, conditions etc)
I want to... allow the user to invoke methods within the dsl

i.e.:
Receipt receipt = resource(order).getTransition("pay").inCase(matches(whatever())).execute(payment);

post with recipes

Posting should allow recipes (in a format similar to tokamak) to be passed

GET and POST form-data

restfulie should be able to post and get using application/x-www-form-urlencoded media type.

Maybe support it with maps or a Params object.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.