Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1540

Have Project extends MutableFaceted<ProjectFacet> instead of Faceted<ProjectFacet>

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.0.0.Final
    • Plugin API
    • None

      In order to try and uninstall a facet from a project I must check if it is an instance of MutableFaceted and then cast like so:

      if (project instanceof MutableFaceted) {
        ((MutableFaceted<ProjectFacet>) project).uninstall(someFacet);
      }
      

      But as far as I can tell, every Project implementation implements MutableFaceted, so it would be nice if Project extended MutableFaceted so that I could avoid casting.

      Alternatively, if there is a good reason for having Project implementations which are not MutableFaceted, perhaps there could be a MutableProject interface for convenience:

      public interface MutableProject extends Project, MutableFaceted<ProjectFacet> {}
      

              Unassigned Unassigned
              mbarkley_jira Max Barkley (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: