Return-Path: X-Original-To: apmail-incubator-isis-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-isis-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 38E97C4C4 for ; Mon, 2 Jul 2012 06:43:12 +0000 (UTC) Received: (qmail 61075 invoked by uid 500); 2 Jul 2012 06:43:11 -0000 Delivered-To: apmail-incubator-isis-dev-archive@incubator.apache.org Received: (qmail 60976 invoked by uid 500); 2 Jul 2012 06:43:10 -0000 Mailing-List: contact isis-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: isis-dev@incubator.apache.org Delivered-To: mailing list isis-dev@incubator.apache.org Received: (qmail 60945 invoked by uid 99); 2 Jul 2012 06:43:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2012 06:43:09 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.214.175] (HELO mail-ob0-f175.google.com) (209.85.214.175) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2012 06:43:02 +0000 Received: by obcva7 with SMTP id va7so7811849obc.6 for ; Sun, 01 Jul 2012 23:42:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:from:date :message-id:subject:to:content-type:x-gm-message-state; bh=BFd6L76P5AhvD5Wm7sY9AVlmMGdRzTKZCTX8zn4X/MU=; b=nDTmdMoiKP47QWP6zX9WQhOioOKpm/4clW/pFbyz9hOZ05HyP7qOfLfWselBmo7qiv l/8A430cAcvrKKAcDCmM9CH0zCGgzqzBk4kjg12t+4CQVR1r8FN5ULcQLy/ZaV0amomQ cU+FSGLXmM/eA4722B9ulQVlAlo90u7q/cR1Pg5P8tHDdyoYQ4oXw8NLvwTyWwWhyVPB UtcrrKvcz8vyMRY+x0gUacXKslhlNjwx4hiUpqLWBDzFWWLP/+L8JOVo/fCW4Gyv7m/3 jXMiuEiazZ7+Yody/mbjxPbP5DZv4j83VGsqBeo4Y8O7LQDSbbWrVFX4xI/PKrhKtucq ntJg== Received: by 10.182.207.106 with SMTP id lv10mr3748251obc.48.1341211362040; Sun, 01 Jul 2012 23:42:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.27.161 with HTTP; Sun, 1 Jul 2012 23:42:21 -0700 (PDT) X-Originating-IP: [86.158.182.103] In-Reply-To: <-4268428652698628641@unknownmsgid> References: <-4268428652698628641@unknownmsgid> From: Dan Haywood Date: Mon, 2 Jul 2012 07:42:21 +0100 Message-ID: Subject: Re: AROW viewer now on github To: isis-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=e89a8f50390acd9ca304c3d31ae7 X-Gm-Message-State: ALoCoQlwdkEx2s1XokZuAabND3xSKPcjmPtetZqcDVkQp/SSa/5ui8NPZJGDqu09SHpMSKtz8IN9 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f50390acd9ca304c3d31ae7 Content-Type: text/plain; charset=ISO-8859-1 On 2 July 2012 05:48, Adam Howard wrote: > Replied inline... > > On Jul 1, 2012, at 2:33 PM, Dan Haywood > wrote: > > >> So, firstly, it looks like @Hidden repositories are still included in > the > >> /services representation in the json-viewer (even in trunk as of last > >> week). > > > > In which case, that's an error in the restfulobjects-viewer (nee > > json-viewer). I've made a note to fix (unless you fix first!) > > I'll try my best :) The html viewer checks > serviceObjectAdapter.getSpecification().isHidden while it is building > it's navigation. This method just checks that HiddenFacet is present > so even marking the service class as @Hidden(When.NEVER) will hide it > in the html viewer. The restfulobjects viewer would handle this in the > ListReprRenderer but I think we want something better than just > checking for the hidden facet. It could be hidden because of > authorities or some business logic reason. This would also affect any > other list results (like an actionresult that is a list.) Does > something like ObjectMember.isVisible(AuthenticationSession, > ObjectAdapter) exist for whole domain objects? > Good analysis. The answer is no, there is no such method, other than the one you've already found - objectAdapter.getSpecification.isHidden(). The reason there is no such method, ie that we only check whether the type is hidden - is that the Isis programming conventions don't yet define any imperative method (eg hideInstance()) that is used to determine whether a particular object instance should be hidden in the UI. That's not to say it's a bad idea, just never been required. If you think that's a good use case, then raise a JIRA on it. In the meantime, it does make sense to make the restfulobjects-viewer similar to the other viewers, ie to call the objectAdapter.getSpecification().isHidden() method when creating the services JSON. > >> And, secondly, is my original question. Can methods annotated > >> @NotInServicesMenu be excluded from the /services representation but > still > >> included as contributed actions? > >> > >> Yes, that's certainly the intent of that annotation. So, I've made a > note > > to check this also. > > I did some research into the restfulobjects, html, and dnd viewers and > I don't think any of them respect this annotation. It looks like the > appropriate course is to make NotInServiceMenuFacet implement > HidingInteractionAdvisor and return a "hidden reason" string only if > the object is a service. This change is in the metamodel so it should > fix it for both the restfulobjects and html viewers. I don't know if > the dnd viewer checks for hidden actions in the same way. I'll try > going down this path and you can let me know if that is the wrong > direction. > Again, good analysis. That's exactly the correct course of action, and will solve it for all viewers. > > > You might have noticed that I finished renaming json-viewer to > > restfulobjects-viewer in the SVN trunk, and that has now been pushed to > my > > github.dom/danhaywood/apacheisis repository for your delectation. > > Since this is my first git and github project I don't know exactly how > to manage this. Should I fork your apacheisis repo into my github > account and then develop against that? Then when I have something > ready I send you a pull request? > Yup, that's how it works! You might want to configure your local GIT instance so that it rebases on pull. That should make it easier to preserve a linear history in the repo. To do that, you can either use: git pull --rebase or you can do git fetch git rebase or you can use git config autosetuprebase always git config branch.master.rebase true so that any git pull will automatically be done with the --rebase flag. > Thanks. > -- > Adam > > > > > p.s. all of the above is referring to version 0.2.0-incubating of the > json(restfulobjects) and html viewers, and version 0.1.2-incubating of > the dnd viewer. I apologize if any or all of these issues have been > solved in trunk. I'll try them out with the latest code tomorrow. > Wanted to get this email out to you since it seems like we can only > have about one discussion a day due to the time difference. > I doubt they have, but no need to apologize... just very happy to have your time and energy being devoted to Isis/RO! Cheers Dan --e89a8f50390acd9ca304c3d31ae7--