package com.onaro.sanscreen.client.view.common.functions;
import com.onaro.client.leekui.runtime.OnaroAdapterUtils;
import com.onaro.commons.util.TextAndNumbersString;
import com.onaro.commons.util.WwnComparable;
import com.onaro.sanscreen.client.view.tabular.columns.AbstractColumnValueRetriever;
import com.onaro.sanscreen.server.interfaces.data.inventory.Port;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.core.runtime.IAdaptable;
/**
* Retriever for port names. This will calculate the display text based on the availability of the Port.name value,
* substituting with wwn if necessary. Much of the complexity is in the implementation of the Comparable interface.
* The WWN substitution is treated as a special case (sorts lowest; then by the hex values). Otherwise, for
* comparing, this class assumes all port names, if any, to be of the format [text][number][text][number]...
*
* Thus the names are compared against corresponding parts.
*/
public class PortNameRetriever extends AbstractColumnValueRetriever