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

org.nakedobjects.plugins.htmlviewer.request.CollectionCrumb Maven / Gradle / Ivy

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

import org.nakedobjects.metamodel.adapter.NakedObject;
import org.nakedobjects.metamodel.commons.debug.DebugString;
import org.nakedobjects.metamodel.commons.lang.ToString;
import org.nakedobjects.plugins.htmlviewer.request.Request;
import org.nakedobjects.plugins.htmlviewer.request.Task;



public class CollectionCrumb implements Crumb {
    private final String collectionId;
    private final String title;

    public CollectionCrumb(final String collectionId, final NakedObject collection) {
        this.collectionId = collectionId;
        title = collection.titleString();
    }

    public void debug(final DebugString string) {
        string.appendln("Collection Crumb");
        string.appendln("object", collectionId);
        string.appendln("title", title);
    }

    public String title() {
        return title;
    }

    @Override
    public String toString() {
        return new ToString(this).append(title()).toString();
    }

    public Request changeContext() {
        return ForwardRequest.listCollection(collectionId);
    }
}

// Copyright (c) Naked Objects Group Ltd.




© 2015 - 2025 Weber Informatics LLC | Privacy Policy