<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Am 22.03.12 13:48, schrieb basZero:
    <blockquote
cite="mid:CAOXzDSGkEhL2fGWfi2dABECJdZQypQeWs3jp=18zUF-XeZdqqg@mail.gmail.com"
      type="cite">Hi Michael,
      <div>I'd go for a backwards compatible approach:</div>
    </blockquote>
    <br>
    ok<br>
    <blockquote
cite="mid:CAOXzDSGkEhL2fGWfi2dABECJdZQypQeWs3jp=18zUF-XeZdqqg@mail.gmail.com"
      type="cite">
      <div> maybe there is a possibility to extend the current YarepUser
        class with a new one (YarepUserV2) like you do it when you
        extend it for realm specific user properties.</div>
    </blockquote>
    <br>
    Well, the disadvantage would be that this would work for only for
    projects using the YarepUser implementation and for example we
    ourselves have quite a few projects which don't do that.<br>
    <br>
    In order to stay backwards compatible independent of the
    implementation I would introduce a new interface e.g. called<br>
    <br>
    public interface ProfileV1 {<br>
        public String getFirstname();<br>
        public String getLastname();<br>
    }<br>
    <br>
    and then implement this by YarepUser implementation:<br>
    <br>
    public class YarepUser extends YarepItem implements User, ProfileV1
    {<br>
    ....<br>
    }<br>
    <br>
    which then allows to check on the interface<br>
    <br>
    if (org.wyona.commons.clazz.ClazzUtil.implementsInterface(user,
    "ProfileV1")) {<br>
        String firstname = ((ProfileV1)user).getFirstname()<br>
    } else {<br>
        log.warn("User implementation does not provide service/interface
    getFirstname()");<br>
    }<br>
    <br>
    Thanks<br>
    <br>
    Michael<br>
    <br>
    <blockquote
cite="mid:CAOXzDSGkEhL2fGWfi2dABECJdZQypQeWs3jp=18zUF-XeZdqqg@mail.gmail.com"
      type="cite">
      <div>Cheers</div>
      <div>Balz<br>
        <br>
        <div title="signature"> </div>
        <div class="gmail_quote">On Thu, Mar 22, 2012 at 1:45 PM,
          Michael Wechner <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:michael.wechner@wyona.com">michael.wechner@wyona.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
            <br>
            Currently the interface<br>
            <br>
            org/wyona/security/core/api/User<br>
            <br>
            only supports<br>
            <br>
            org/wyona/security/core/api/User#getName() (inherited from
            org/wyona/security/core/api/Item).<br>
            <br>
            which is also supported by<br>
            <br>
            src/core/java/org/wyona/security/core/api/Group<br>
            <br>
            because it also inherits the Item class.<br>
            <br>
            From a User class point of view this is not really good,
            because one would expect<br>
            <br>
            getFirstname()<br>
            getLastname()<br>
            <br>
            Also it would be nice to set "custom" properties (String and
            Binary/Streams)<br>
            <br>
            setProperty(String name)<br>
            getProperty(String name)<br>
            <br>
            etc.<br>
            <br>
            Hence I would like to enhance the API, but this means that
            all implementations based on this API will break.<br>
            As an alternative one could introduce a new version of this
            API, which would make it completely backwards compatible,<br>
            but more complicated.<br>
            <br>
            WDYT?<br>
            <br>
            Thanks<span class="HOEnZb"><font color="#888888"><br>
                <br>
                Michael<br>
                -- <br>
                Yanel-development mailing list <a
                  moz-do-not-send="true"
                  href="mailto:Yanel-development@wyona.com"
                  target="_blank">Yanel-development@wyona.com</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development"
                  target="_blank">http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development</a><br>
              </font></span></blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>