Refine search![Refine arrow](//d16xvuom8mr9m8.cloudfront.net/code/public/images/refine-arrow.226bef887e7b1c430d6d498717d9d561.svg)
@DomainService(nature = NatureOfService.DOMAIN) public class UserProfileServiceDefault implements UserProfileService { @Programmatic @Override public String userProfileName() { return authenticationSessionProvider.getAuthenticationSession().getUserName(); } @Inject AuthenticationSessionProvider authenticationSessionProvider; }
@DomainService(nature = NatureOfService.DOMAIN) public class ToDoAppDashboardService { @Action( semantics = SemanticsOf.SAFE //hidden = Where.EVERYWHERE ) @HomePage public ToDoAppDashboard lookup() { return container.injectServicesInto(new ToDoAppDashboard()); } @Inject private DomainObjectContainer container; }
@DomainService( nature = NatureOfService.DOMAIN ) public static class Default implements SupportingDocumentsEvaluator { @Override public List<Document> supportedBy(Document candidateSupportingDocument) { final List<Paperclip> byDocument = paperclipRepository.findByDocument(candidateSupportingDocument); final List<Document> supportedDocumentsIfAny = FluentIterable.from(byDocument) .transform(x -> x.getAttachedTo()) .filter(Document.class::isInstance) .transform(Document.class::cast) .toList(); return Lists.newArrayList(supportedDocumentsIfAny); } @Override public Evaluation evaluate(final Document candidateSupportingDocument) { List<Document> documents = supportedBy(candidateSupportingDocument); boolean b = documents != null && !documents.isEmpty(); return b ? Evaluation.SUPPORTING : Evaluation.UNKNOWN; } @Inject PaperclipRepository paperclipRepository; }
/** * Implemented as a subscriber so can be overridden by consuming application if required. */ @DomainService(nature = NatureOfService.DOMAIN) public static class TitleSubscriber extends AbstractSubscriber { public String getId() { return "incodeDocuments.RenderingStrategy$TitleSubscriber"; } @EventHandler @Subscribe public void on(RenderingStrategy.TitleUiEvent ev) { if(ev.getTitle() != null) { return; } ev.setTranslatableTitle(titleOf(ev.getSource())); } private TranslatableString titleOf(final RenderingStrategy renderingStrategy) { return TranslatableString.tr("[{reference}] {name}", "reference", renderingStrategy.getReference(), "name", renderingStrategy.getName()); } @Inject TitleService titleService; }
/** * Implemented as a subscriber so can be overridden by consuming application if required. */ @DomainService(nature = NatureOfService.DOMAIN) public static class TitleSubscriber extends AbstractSubscriber { public String getId() { return "incodeDocuments.RenderingStrategy$TitleSubscriber"; } @EventHandler @Subscribe public void on(RenderingStrategy.TitleUiEvent ev) { if(ev.getTitle() != null) { return; } ev.setTranslatableTitle(titleOf(ev.getSource())); } private TranslatableString titleOf(final RenderingStrategy renderingStrategy) { return TranslatableString.tr("[{reference}] {name}", "reference", renderingStrategy.getReference(), "name", renderingStrategy.getName()); } @Inject TitleService titleService; }
@DomainService( nature = NatureOfService.DOMAIN ) public static class Default implements SupportingDocumentsEvaluator { @Override public List<Document> supportedBy(Document candidateSupportingDocument) { final List<Paperclip> byDocument = paperclipRepository.findByDocument(candidateSupportingDocument); final List<Document> supportedDocumentsIfAny = FluentIterable.from(byDocument) .transform(x -> x.getAttachedTo()) .filter(Document.class::isInstance) .transform(Document.class::cast) .toList(); return Lists.newArrayList(supportedDocumentsIfAny); } @Override public Evaluation evaluate(final Document candidateSupportingDocument) { List<Document> documents = supportedBy(candidateSupportingDocument); boolean b = documents != null && !documents.isEmpty(); return b ? Evaluation.SUPPORTING : Evaluation.UNKNOWN; } @Inject PaperclipRepository paperclipRepository; }
@DomainService( nature = NatureOfService.DOMAIN @Inject private MeService meService;
/** * Implemented as a subscriber so can be overridden by consuming application if required. */ @DomainService(nature = NatureOfService.DOMAIN) public static class TitleSubscriber extends AbstractSubscriber { public String getId() { return "incodeDocuments.DocumentType$TitleSubscriber"; } @EventHandler @Subscribe public void on(DocumentType.TitleUiEvent ev) { if(ev.getTitle() != null) { return; } ev.setTranslatableTitle(titleOf(ev.getSource())); } private TranslatableString titleOf(final DocumentType documentType) { return TranslatableString.tr( "[{reference}] {name}", "reference", documentType.getReference(), "name", documentType.getName() ); } @Inject TitleService titleService; }
/** * Implemented as a subscriber so can be overridden by consuming application if required. */ @DomainService(nature = NatureOfService.DOMAIN) public static class TitleSubscriber extends AbstractSubscriber { public String getId() { return "incodeDocuments.DocumentType$TitleSubscriber"; } @EventHandler @Subscribe public void on(DocumentType.TitleUiEvent ev) { if(ev.getTitle() != null) { return; } ev.setTranslatableTitle(titleOf(ev.getSource())); } private TranslatableString titleOf(final DocumentType documentType) { return TranslatableString.tr( "[{reference}] {name}", "reference", documentType.getReference(), "name", documentType.getName() ); } @Inject TitleService titleService; }
@DomainService( nature = NatureOfService.DOMAIN @Inject DomainObjectContainer container;
/** * Implemented as a subscriber so can be overridden by consuming application if required. */ @DomainService(nature = NatureOfService.DOMAIN) public static class TitleSubscriber extends AbstractSubscriber { public String getId() { return "incodeDocuments.DocumentTemplate$TitleSubscriber"; } @EventHandler @Subscribe public void on(DocumentTemplate.TitleUiEvent ev) { if(ev.getTitle() != null) { return; } ev.setTranslatableTitle(titleOf(ev.getSource())); } private TranslatableString titleOf(final DocumentTemplate template) { if(template.getDate() != null) { return TranslatableString.tr("[{type}] ({date})", "type", template.getType().getReference(), "date", template.getDate()); } else { return TranslatableString.tr("[{type}] {name}", "name", template.getName(), "type", template.getType().getReference()); } } @Inject TitleService titleService; }
/** * Implemented as a subscriber so can be overridden by consuming application if required. */ @DomainService(nature = NatureOfService.DOMAIN) public static class TitleSubscriber extends AbstractSubscriber { public String getId() { return "incodeDocuments.DocumentTemplate$TitleSubscriber"; } @EventHandler @Subscribe public void on(DocumentTemplate.TitleUiEvent ev) { if(ev.getTitle() != null) { return; } ev.setTranslatableTitle(titleOf(ev.getSource())); } private TranslatableString titleOf(final DocumentTemplate template) { if(template.getDate() != null) { return TranslatableString.tr("[{type}] ({date})", "type", template.getType().getReference(), "date", template.getDate()); } else { return TranslatableString.tr("[{type}] {name}", "name", template.getName(), "type", template.getType().getReference()); } } @Inject TitleService titleService; }
@DomainService( nature = NatureOfService.DOMAIN, repositoryFor = Applicability.class @Inject RepositoryService repositoryService;
@DomainService( nature = NatureOfService.DOMAIN, repositoryFor = Applicability.class @Inject RepositoryService repositoryService;
@DomainService(nature = NatureOfService.DOMAIN) public class DtoMappingHelper { @Inject BookmarkService bookmarkService;
@DomainService(nature = NatureOfService.DOMAIN) public class DocumentCreatorService { @Inject PaperclipRepository paperclipRepository;
@DomainService(nature = NatureOfService.DOMAIN) public class DocumentCreatorService { @Inject PaperclipRepository paperclipRepository;
@DomainService(nature = NatureOfService.DOMAIN) public class CalendarService { @Inject org.apache.isis.applib.services.clock.ClockService clockService;
@DomainService( nature = NatureOfService.DOMAIN @Inject SimilarToService similarToService;
@DomainService(nature = NatureOfService.DOMAIN) public class XDocReportService { @Inject ConfigurationService configurationService;