Example usage for javax.xml.registry.infomodel User getOrganization

List of usage examples for javax.xml.registry.infomodel User getOrganization

Introduction

In this page you can find the example usage for javax.xml.registry.infomodel User getOrganization.

Prototype

Organization getOrganization() throws JAXRException;

Source Link

Document

Gets the Organization that this User is affiliated with.

Usage

From source file:it.cnr.icar.eric.client.ui.swing.graph.JBGraph.java

/**
 * DOCUMENT ME!//w ww .j av  a  2s. c  o  m
 *
 * @param cell DOCUMENT ME!
 * @param user DOCUMENT ME!
 *
 * @return DOCUMENT ME!
 */
private ArrayList<DefaultGraphCell> showRelatedObjects(JBGraphCell cell, User user) {
    ArrayList<DefaultGraphCell> relatedCells = new ArrayList<DefaultGraphCell>();

    if (user == null) {
        return relatedCells;
    }

    try {
        //parent Organization
        Organization org = user.getOrganization();

        if (org != null) {
            JBGraphCell newCell = addRelatedObject(cell, org, new Rectangle(0, 0, 50, 50), "affiliated with",
                    false);
            relatedCells.add(newCell);
        }
    } catch (JAXRException e) {
        RegistryBrowser.displayError(e);
    }

    return relatedCells;
}