/* * [HowDistributeZips.java] * * Summary: extended version of Via for sender. * * Copyright: (c) 2009-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: * 10.2 2009-04-03 tidy up code to check presence of necessary files to make it more WORA. */ package com.mindprod.replicatoruse; import com.mindprod.fastcat.FastCat; import java.io.Serializable; import static com.mindprod.replicatoruse.Phrase.*; /** * extended version of Via for sender. * * @author Roedy Green, Canadian Mind Products * @version 10.2 2009-04-03 tidy up code to check presence of necessary files to make it more WORA. * @since 2009 */ enum HowDistributeZips implements Serializable { /** * don't redistribute */ @SuppressWarnings( { "EnumeratedConstantNamingConvention" } ) A_NONE( "I don't redistribute the zips to anyone" + ". " + "This is the most common case.", NADA, NADA ), /** * from a website on the Internet */ @SuppressWarnings( { "EnumeratedConstantNamingConvention" } ) B_VIA_WEBSITE( "via a website (possibly password-protected) on the Internet.", new FastCat( 4 ).append( "Run ReplicatorSender to prepare and automatically upload " ) .append( "the recently changed files, " ) .append( INCLUDING ) .append( "to the Internet website." ).toString(), new FastCat( 6 ).append( "Upload " ) .append( ALL_OR_CHANGED_FILES ) .append( IN_YOUR ) .append( INCLUDING ) .append( RECEIVER_ZIP_STAGING_DIR ) .append( "to the Internet website with FTP." ).toString() ), /** * via CD. */ @SuppressWarnings( { "EnumeratedConstantNamingConvention" } ) C_TO_CD( "via a CD ROM that I mail or " + "give to relay sites and/or clients.", new FastCat( 9 ).append( "Burn a CD " ) .append( LIKE_ROXIO ) .append( "of " ) .append( ALL_THE_FILES ) .append( IN_YOUR ) .append( "SENDER_ZIP_STAGING_DIR, " ) .append( INCLUDING ) .append( TO_ROOT ) .append( "CD." ) .append( DUP ).toString(), new FastCat( 10 ).append( "Burn a CD " ) .append( Phrase.LIKE_ROXIO ) .append( "of " ) .append( Phrase.ALL_THE_FILES ) .append( Phrase.IN_YOUR ) .append( "RECEIVER_ZIP_STAGING_DIR, " ) .append( Phrase.INCLUDING ) .append( Phrase.TO_ROOT ) .append( "CD." ) .append( Phrase.DUP ).toString() ), /** * via DVD. */ @SuppressWarnings( { "EnumeratedConstantNamingConvention" } ) D_TO_DVD( "via a DVD I mail or " + "give to relay sites and/or clients.", new FastCat( 10 ).append( "Burn a DVD " ) .append( Phrase.LIKE_ROXIO ) .append( "of " ) .append( Phrase.ALL_THE_FILES ) .append( Phrase.IN_YOUR ) .append( SENDER_ZIP_STAGING_DIR ) .append( Phrase.INCLUDING ) .append( Phrase.TO_ROOT ) .append( "DVD." ) .append( Phrase.DUP ).toString(), new FastCat( 9 ).append( "Burn a DVD " ) .append( Phrase.LIKE_ROXIO ) .append( Phrase.ALL_THE_FILES ) .append( Phrase.IN_YOUR ) .append( RECEIVER_ZIP_STAGING_DIR ) .append( Phrase.INCLUDING ) .append( Phrase.TO_ROOT ) .append( "DVD." ) .append( Phrase.DUP ).toString() ), /** * via LAN */ @SuppressWarnings( { "EnumeratedConstantNamingConvention" } ) E_TO_LAN( new FastCat( 2 ) .append( "via shared files on a client's LAN, " ) .append( "usually without Internet access." ).toString(), "Let a relay site handle distribution.", new FastCat( 7 ) .append( "Copy " ) .append( ALL_OR_CHANGED_FILES ) .append( Phrase.INCLUDING ) .append( Phrase.IN_YOUR ) .append( Phrase.RECEIVER_ZIP_STAGING_DIR ) .append( Phrase.SHARED_LAN ) .append( Phrase.ANY_MEANS ).toString() ), /** * via internal website. */ @SuppressWarnings( { "EnumeratedConstantNamingConvention" } ) F_TO_INTERNAL_WEBSITE( new FastCat( 3 ).append( "via a client's local or " ) .append( "LAN-based internal HTTP website " ) .append( "usually without Internet access." ).toString(), "Let a relay site handle distribution.", new FastCat( 7 ).append( "Copy " ) .append( ALL_OR_CHANGED_FILES ) .append( Phrase.INCLUDING ) .append( Phrase.IN_YOUR ) .append( Phrase.RECEIVER_ZIP_STAGING_DIR ) .append( Phrase.SERVING_DIRECTORY ) .append( Phrase.ANY_MEANS ).toString() ), /** * via client's local directory, put ther by somebody else. */ @SuppressWarnings( { "EnumeratedConstantNamingConvention" } ) G_TO_CLIENTS_LOCAL_DISK( new FastCat( 2 ).append( "via a directory " ) .append( "on a client's local hard disk." ).toString(), "Let a relay site handle distribution.", new FastCat( 8 ).append( "Copy " ) .append( ALL_OR_CHANGED_FILES ) .append( Phrase.INCLUDING ) .append( Phrase.IN_YOUR ) .append( Phrase.RECEIVER_ZIP_STAGING_DIR ) .append( Phrase.THIRD_DIRECTORY ) .append( Phrase.NOT_RECEIVER_STAGING ) .append( Phrase.ANY_MEANS ).toString() ), /** * via floppies */ @SuppressWarnings( { "EnumeratedConstantNamingConvention" } ) H_TO_FLOPPIES( new FastCat( 2 ).append( "via a stack of floppies I mail " ) .append( "or give to relay sites and/or clients." ).toString(), new FastCat( 6 ).append( "Copy " ) .append( ALL_OR_CHANGED_FILES ) .append( Phrase.INCLUDING ) .append( Phrase.IN_YOUR ) .append( Phrase.SENDER_ZIP_STAGING_DIR ) .append( Phrase.ONTO_FLOPPIES ).toString(), new FastCat( 6 ).append( "Copy " ) .append( ALL_OR_CHANGED_FILES ) .append( Phrase.INCLUDING ) .append( Phrase.IN_YOUR ) .append( Phrase.RECEIVER_ZIP_STAGING_DIR ) .append( Phrase.ONTO_FLOPPIES ).toString() ), /** * via some sort of URL */ @SuppressWarnings( { "EnumeratedConstantNamingConvention" } ) I_TO_URL( "via some other place that can be described with an URL.", "Let a relay site handle distribution.", new FastCat( 7 ).append( "Copy " ) .append( ALL_OR_CHANGED_FILES ) .append( Phrase.INCLUDING ) .append( Phrase.IN_YOUR ) .append( Phrase.RECEIVER_ZIP_STAGING_DIR ) .append( Phrase.TO_URL ) .append( Phrase.NOT_RECEIVER_STAGING ) .append( Phrase.ANY_MEANS ).toString() ); /** * Layout version number. */ private static final long serialVersionUID = 400L; /** * instructions on how an authors prepares that type of distribution */ private final String authorHowDistributeInstructions; /** * long description of this option. */ private final String description; /** * instructions on how a relay prepares that type of distribution */ private final String relayHowDistributeInstructions; /** * constructor * * @param description long description of what this option means. * @param authorHowDistributeInstructions instructions to author on distributing. * @param relayHowDistributeInstructions instructions to relayer on distributing. */ @SuppressWarnings( { "MethodParameterNamingConvention" } ) HowDistributeZips( String description, String authorHowDistributeInstructions, String relayHowDistributeInstructions ) { this.description = description; this.authorHowDistributeInstructions = authorHowDistributeInstructions; this.relayHowDistributeInstructions = relayHowDistributeInstructions; } /** * wording of question to choose an option * * @return question wording */ @SuppressWarnings( { "SameReturnValue" } ) public static String getQuestion() { return "HowToProcess do you distribute compressed zip files to others?"; } /** * get long description of how to do this kind of distribution. * * @return instructions */ public String getAuthorHowDistributeInsructions() { return authorHowDistributeInstructions; } /** * get long description of what this option means. * * @return description */ public String getDescription() { return description; } /** * get long description of how to do this kind of distribution. * * @return instructions */ public String getRelayHowDistributeInsructions() { return relayHowDistributeInstructions; } }