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

org.bidib.wizard.common.labels.WizardLabelWrapper Maven / Gradle / Ivy

package org.bidib.wizard.common.labels;

import java.io.File;

import org.bidib.jbidibc.core.schema.bidibbase.DefaultLabelsActionType;
import org.bidib.jbidibc.core.schema.bidiblabels.NodeLabels;
import org.bidib.jbidibc.messages.SoftwareVersion;
import org.bidib.jbidibc.messages.enums.PortModelEnum;
import org.bidib.wizard.common.labels.DefaultWizardLabelFactory.DefaultLabelsApplied;
import org.bidib.wizard.common.labels.DefaultWizardLabelFactory.VersionedDefaultNodeLabelsWrapper;

public interface WizardLabelWrapper {

    WizardLabelFactory getWizardLabelFactory();

    /**
     * Load all labels.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     */
    NodeLabels loadLabels(Long uniqueId);

    /**
     * Save the port labels of the node.
     * 
     * @param uniqueId
     *            the unique id of the node
     */
    void saveNodeLabels(Long uniqueId);

    /**
     * Delete the port labels of the node.
     * 
     * @param uniqueId
     *            the unique id of the node
     */
    void deleteNodeLabels(Long uniqueId);

    /**
     * Check if the default labels are applied.
     * 
     * @param uniqueId
     *            the unique id of the node
     * @return default labels applied
     */
    DefaultLabelsApplied getDefaultLabelsApplied(Long uniqueId);

    /**
     * Set the default labels are applied.
     * 
     * @param lang
     *            the language
     * @param uniqueId
     *            the unique id of the node
     * @param softwareVersion
     *            the software version
     * @param relevantPidBits
     *            the relevant pid bits
     * @param portModel
     *            the port model
     * @param defaultLabelsAction
     *            default labels applied action to set
     */
    void setDefaultLabelsApplied(
        String lang, Long uniqueId, final SoftwareVersion softwareVersion, int relevantPidBits,
        final PortModelEnum portModel, DefaultLabelsActionType defaultLabelsAction);

    /**
     * Check if default labels for the node are available.
     * 
     * @param lang
     *            the language
     * @param uniqueId
     *            the uniqueId of the node
     * @param softwareVersion
     *            the software version
     * @param relevantPidBits
     *            the relevant PID bits
     * @return default labels available
     */
    VersionedDefaultNodeLabelsWrapper isDefaultLabelsAvailable(
        final String lang, Long uniqueId, final SoftwareVersion softwareVersion, int relevantPidBits);

    /**
     * Prepare default labels.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @return the default node labels
     */
    NodeLabels prepareDefaultLabels(Long uniqueId);

    /**
     * Save the default labels to the provided file.
     * 
     * @param nodeLabels
     *            the default labels
     * @param file
     *            the file
     */
    void saveDefaultLabels(NodeLabels nodeLabels, File file);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy