com.netgrif.application.engine.petrinet.web.responsebodies.PetriNetReferenceResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of application-engine Show documentation
Show all versions of application-engine Show documentation
System provides workflow management functions including user, role and data management.
package com.netgrif.application.engine.petrinet.web.responsebodies;
import com.netgrif.application.engine.petrinet.web.PetriNetController;
import org.springframework.hateoas.EntityModel;
import org.springframework.hateoas.server.mvc.WebMvcLinkBuilder;
public class PetriNetReferenceResource extends EntityModel {
public PetriNetReferenceResource(PetriNetReference content) {
super(content);
buildLinks();
}
private void buildLinks() {
add(WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder
.methodOn(PetriNetController.class).getOne(getContent().getStringId(), null, null))
.withSelfRel());
add(WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder
.methodOn(PetriNetController.class).getOne(getContent().getIdentifier(), getContent().getVersion(), null, null))
.withRel("identifier"));
add(WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder
.methodOn(PetriNetController.class).getRoles(getContent().getStringId(), null))
.withRel("roles"));
add(WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder
.methodOn(PetriNetController.class).getTransactions(getContent().getStringId(), null))
.withRel("transaction"));
add(WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder
.methodOn(PetriNetController.class).getNetFile(getContent().getStringId(), getContent().getTitle(), null, null))
.withRel("file"));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy