All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nakedobjects.plugins.htmlviewer.html.CollectionLink Maven / Gradle / Ivy

The newest version!
package org.nakedobjects.plugins.htmlviewer.html;

import java.io.PrintWriter;

import org.nakedobjects.metamodel.adapter.NakedObject;
import org.nakedobjects.metamodel.spec.NakedObjectSpecification;
import org.nakedobjects.metamodel.spec.feature.NakedObjectAssociation;
import org.nakedobjects.plugins.htmlviewer.component.ImageLookup;
import org.nakedobjects.plugins.htmlviewer.request.Request;



class CollectionLink extends AbstractComponent {
    private final String objectId;
    private final String fieldId;
    private final NakedObjectSpecification specification;
    private final String title;
    private final String description;

    public CollectionLink(
            final NakedObjectAssociation field,
            final NakedObject collection,
            final String description,
            final String objectId) {
        this.description = description;
        this.objectId = objectId;
        fieldId = field.getId();
        title = collection.titleString();
        specification = field.getSpecification();
    }

    public void write(final PrintWriter writer) {
        writer.print("");

        writer.print("\"icon\"");
        // writer.print(elementType);
        writer.print(title);
        writer.print("");
        writer.println("");
    }

}

// Copyright (c) Naked Objects Group Ltd.




© 2015 - 2025 Weber Informatics LLC | Privacy Policy