1. /*
  2. * @(#)RelationType.java 1.17 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.management.relation;
  8. import java.util.ArrayList; // for Javadoc
  9. import java.util.List;
  10. import java.io.Serializable;
  11. /**
  12. * The RelationType interface has to be implemented by any class expected to
  13. * represent a relation type.
  14. *
  15. * @since 1.5
  16. */
  17. public interface RelationType extends Serializable {
  18. //
  19. // Accessors
  20. //
  21. /**
  22. * Returns the relation type name.
  23. *
  24. * @return the relation type name.
  25. */
  26. public String getRelationTypeName();
  27. /**
  28. * Returns the list of role definitions (ArrayList of RoleInfo objects).
  29. *
  30. * @return an {@link ArrayList} of {@link RoleInfo}.
  31. */
  32. public List getRoleInfos();
  33. /**
  34. * Returns the role info (RoleInfo object) for the given role info name
  35. * (null if not found).
  36. *
  37. * @param theRoleInfoName role info name
  38. *
  39. * @return RoleInfo object providing role definition
  40. * does not exist
  41. *
  42. * @exception IllegalArgumentException if null parameter
  43. * @exception RoleInfoNotFoundException if no role info with that name in
  44. * relation type.
  45. */
  46. public RoleInfo getRoleInfo(String theRoleInfoName)
  47. throws IllegalArgumentException,
  48. RoleInfoNotFoundException;
  49. }