/* * [AssignCSSClasses.java] * * Summary: Determine the css class for a given URL. * * Copyright: (c) 2011-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2011-01-10 initial version */ package com.mindprod.htmlmacros.support; import java.io.File; /** * Determine the css class for a given URL. *
* * @author Roedy Green, Canadian Mind Products * @version 1.0 2011-01-10 initial version * @noinspection WeakerAccess * @since 2011-01-10 */ public interface AssignCSSClasses { // methods /** * compute a better htmlClass given the URL * * @param url URL of link, full or relative * @param fileBeingDistributed where link is embedded. Needed to recognise class of local links without any dir * names. Normally where link is embedded does not matter, but for links without dir * we need to find embedding dir. * * @return css class for this link, nell for none */ String assignCSSClass( final String url, final File fileBeingDistributed );// /method /** * do we consider disturbing this class of link? Some classes we manually assign, and we do not want them changed. * * @param htmlClass class of URL we are considering disturbing * * @return true if ok to disturb */ boolean isCSSClassModifiable( final String htmlClass );// /method /** * does this file need its CSS classes repaired? * * @param fileBeingProcessed file in question */ public abstract boolean needsCSSRepair( File fileBeingProcessed );// /method // /methods }