Search in sources :

Example 16 with Bookmark

use of org.apache.isis.applib.services.bookmark.Bookmark in project estatio by estatio.

the class PaperclipRepository method findByAttachedTo.

// endregion
// region > findByAttachedTo (programmatic)
@Programmatic
public List<Paperclip> findByAttachedTo(final Object attachedTo) {
    if (attachedTo == null) {
        return null;
    }
    final Bookmark bookmark = bookmarkService.bookmarkFor(attachedTo);
    if (bookmark == null) {
        return null;
    }
    final String attachedToStr = bookmark.toString();
    return repositoryService.allMatches(new QueryDefault<>(Paperclip.class, "findByAttachedTo", "attachedToStr", attachedToStr));
}
Also used : Bookmark(org.apache.isis.applib.services.bookmark.Bookmark) Programmatic(org.apache.isis.applib.annotation.Programmatic)

Aggregations

Bookmark (org.apache.isis.applib.services.bookmark.Bookmark)16 Programmatic (org.apache.isis.applib.annotation.Programmatic)9 Document (org.incode.module.document.dom.impl.docs.Document)3 List (java.util.List)1 ParamDto (org.apache.isis.schema.cmd.v1.ParamDto)1 Property (org.estatio.module.asset.dom.Property)1 IncomingDocAsInvoiceViewModel (org.estatio.module.capex.app.invoice.IncomingDocAsInvoiceViewModel)1 IncomingDocAsOrderViewModel (org.estatio.module.capex.app.order.IncomingDocAsOrderViewModel)1 Taxonomy (org.incode.module.classification.dom.impl.category.taxonomy.Taxonomy)1 FinderInteraction (org.incode.module.unittestsupport.dom.repo.FinderInteraction)1 ApplicationTenancy (org.isisaddons.module.security.dom.tenancy.ApplicationTenancy)1 Expectations (org.jmock.Expectations)1 Before (org.junit.Before)1