Class LicenseAndOrganisationCollator
java.lang.Object
org.apache.creadur.whisker.model.Visitor
org.apache.creadur.whisker.model.LicenseAndOrganisationCollator
Collates licenses and organisations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the licenses collected.Gets the organisations collected.booleanisOnlyLicense(License license) Was this the only license collected?booleanisOnlyOrganisation(String primaryOrganisationId) Is there only one organisation collected with the given id?toString()Something useful for logging.booleanDon't traverse resources.voidvisit(ByOrganisation byOrganisation) VisitsByOrganisation.voidvisit(WithLicense license) VisitsWithLicense.Methods inherited from class Visitor
traverseByOrganisation, traversePublicDomain, traverseWithLicense, visit, visit
-
Constructor Details
-
LicenseAndOrganisationCollator
public LicenseAndOrganisationCollator()
-
-
Method Details
-
getLicenses
-
getOrganisation
-
traverseResource
public boolean traverseResource()Don't traverse resources.- Overrides:
traverseResourcein classVisitor- Returns:
- false
- See Also:
-
visit
VisitsWithLicense. -
isOnlyLicense
Was this the only license collected?- Parameters:
license- not null- Returns:
- true when the collection contains just this license, false when no licenses or any other licenses were collected
-
visit
VisitsByOrganisation. -
toString
-
isOnlyOrganisation
Is there only one organisation collected with the given id?- Parameters:
primaryOrganisationId- not null- Returns:
- true when only one organisation has been collected and it has the given id
-