Giter Site home page Giter Site logo

Comments (6)

phax avatar phax commented on July 29, 2024

Hi Jochen!
I adopted the IPartnershipFactory and removed the getPartnerMap and getPartnershipMap methods as suggested - they are still available directly from within AbstractPartnershipFactory.
Additionally I changed the return type of addPartnership from void to EChange to handle existing partnerships more gracefully.

Concerning the Mongo Partnership: I'd be happy to add this. I would create a separate Maven module (like as2-partnership-mongodb) and add it to this workspace. Is there a standalone test available that works without having Mongo locally installed?

Thanks, Philip

from as2-lib.

jochenberger avatar jochenberger commented on July 29, 2024

Is there a standalone test available that works without having Mongo locally installed?

Not yet, but I wanted to write one anyway. I'm not too familiar with Maven and JUnit anymore, I usually do Gradle/Spock these days.

from as2-lib.

jochenberger avatar jochenberger commented on July 29, 2024

I adopted the IPartnershipFactory and removed the getPartnerMap and getPartnershipMap methods as suggested

Do you want to keep the other methods, like addPartner, removePartner and the others that don't have "ship" in their name? I think they are also unused.

from as2-lib.

phax avatar phax commented on July 29, 2024

They do make sense in certain ways. I extracted a sub-interface IPartnershipFactoryWithPartners that should do the trick for you by sticking to the existing interface :)

from as2-lib.

jochenberger avatar jochenberger commented on July 29, 2024

Yes, it does the trick, thanks.
I must admit that I find it hard to understand the separation between Partner and Partnership. Why is Partnership a real class whereas Partner is only a Map? It seems to me as if Partners are helper objects that are only used to bootstrap the Partnerships from an XML configuration.
I think that an application using as2-lib should be supposed to care about either Partners or Partnerships. If it should care about Partners, then the creation of the actual Partnerships should be encapsulated somewhere within the lib.
I'm not sure if that makes any sense to you, if it doesn't, maybe that proves, that the current parter vs. partnership concept is a little hard to grasp. ;-)

from as2-lib.

phax avatar phax commented on July 29, 2024

Well good point. I introduced a class Partner with a corresponding IPartner interface. Class Partner is basically a StringMap but with a different type around. This should make things more easily graspable.

But you are absolutely right that this construct is only used within XML. For the rest, the getSenderID and getReceiverID stuff is sufficient. Therefore I moved everything that is "xml partnership" related to a separate sub-package.

from as2-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.