Class ModuleUsage

java.lang.Object
com.nomagic.magicdraw.core.modules.ModuleUsage

@OpenApiAll public class ModuleUsage extends Object
Information about module attachment on some owner. The same module can be attached on many owners, so this class is used for describing one of such usages
  • Constructor Summary

    Constructors
    Constructor
    Description
    ModuleUsage(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IProject module)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    createUsages(com.nomagic.ci.persistence.IAttachedProject module, boolean allUsages)
    Create usages information for a given module
    createUsages(com.nomagic.ci.persistence.IProject owner, Collection<com.nomagic.ci.persistence.IProject> modules)
    Create usages information of given modules from given owner.
    createUsages(Collection<com.nomagic.ci.persistence.IAttachedProject> modules, boolean allUsages)
    Create usages information for a given modules
    createUsages(Collection<com.nomagic.ci.persistence.IAttachedProject> modules, Collection<? extends com.nomagic.ci.persistence.IProject> exceptTheseOwners)
    Create all usages information for a given modules excepts if modules is used by given owners
    boolean
     
    com.nomagic.ci.persistence.IProject
     
    com.nomagic.ci.persistence.IProject
     
    int
     
    boolean
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ModuleUsage

      public ModuleUsage(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IProject module)
      Constructor
      Parameters:
      owner - module owner
      module - attached module
  • Method Details

    • getOwner

      public com.nomagic.ci.persistence.IProject getOwner()
      Returns:
      attached module owner
    • getUsed

      public com.nomagic.ci.persistence.IProject getUsed()
      Returns:
      attached module
    • isValid

      public boolean isValid()
      Returns:
      true if usage is valid - owner actually has used project as attachment
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • createUsages

      public static List<ModuleUsage> createUsages(com.nomagic.ci.persistence.IAttachedProject module, boolean allUsages)
      Create usages information for a given module
      Parameters:
      module - module
      allUsages - create just one (first) usage information or create info about all usages
      Returns:
      usages
    • createUsages

      public static List<ModuleUsage> createUsages(com.nomagic.ci.persistence.IProject owner, Collection<com.nomagic.ci.persistence.IProject> modules)
      Create usages information of given modules from given owner.
      Parameters:
      owner - modules owner
      modules - attached modules to owner
      Returns:
      usages
    • createUsages

      public static List<ModuleUsage> createUsages(Collection<com.nomagic.ci.persistence.IAttachedProject> modules, boolean allUsages)
      Create usages information for a given modules
      Parameters:
      modules - module
      allUsages - create just one (first) usage information for every given module or create info about all usages
      Returns:
      usages
    • createUsages

      public static List<ModuleUsage> createUsages(Collection<com.nomagic.ci.persistence.IAttachedProject> modules, Collection<? extends com.nomagic.ci.persistence.IProject> exceptTheseOwners)
      Create all usages information for a given modules excepts if modules is used by given owners
      Parameters:
      modules - modules
      exceptTheseOwners - skip usages from these owners
      Returns:
      usages