Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is a brief introduction to wiring in additional JAX-RS resources into Fedora 4.

Boilerplate

 

Code Block

@Component
@Scope("prototype")
@Path("/{path: .*}/fcr:text")
public class MyCustomTextExtractionEndpoint extends AbstractResource {

    @InjectedSession
    protected Session session;

    private final Logger logger = getLogger(FedoraContent.class);
}

...

Try to make extensive use of TRACE-level logging (in addition to inline comments and javadoc comments, of course) to help expose the internal workings of your class in a sensible way to downstream users.

 

An Action

Here is an example API action:

...