/** * Called when the singleton is destroyed. Perform all cleanup in this method. * * @throws Exception * If something goes wrong */ @OverrideOnDemand protected void onDestroy () throws Exception {}
@OverrideOnDemand @Nonnull public String getPlainText () { return ""; }
/** * Callback * * @param aOption * The added option. Never <code>null</code>. */ @OverrideOnDemand protected void onAddOption (@Nonnull final HCOption aOption) {}
@OverrideOnDemand @Nullable public List <IMicroNode> getChildren () { return null; }
@OverrideOnDemand @Nullable public IMicroNode getFirstChild () { return null; }
/** * modify parameter map * * @param aParams * parameter map */ @OverrideOnDemand protected void modifyParams (@Nonnull final JSAssocArray aParams) {}
@Nonnegative @OverrideOnDemand public int getMinimumArgumentCount () { return 1; }
@OverrideOnDemand protected void onWrite (@Nonnegative final int nBytesWritten, final long nTotalBytesWritten) { s_aLogger.info ("Wrote " + nBytesWritten + " byte(s); now at " + nTotalBytesWritten); }
@OverrideOnDemand @Nullable public IMicroNode getChildAtIndex (@Nonnegative final int nIndex) { return null; }
/** * @param aRoot * The JSON messages object to extend * @param aDisplayLocale * The locale to be used for test resolving. May be <code>null</code> * if none passed. */ @OverrideOnDemand protected void extendJSON (@Nonnull final JSAssocArray aRoot, @Nullable final Locale aDisplayLocale) {}
/** * Overwrite this method to create a custom {@link HCHead} implementation * * @return Never <code>null</code>. */ @Nonnull @OverrideOnDemand protected HCHead createHead () { return new HCHead (); }
/** * Overwrite this method to create a custom {@link HCBody} implementation * * @return Never <code>null</code>. */ @Nonnull @OverrideOnDemand protected HCBody createBody () { return new HCBody (); }
@OverrideOnDemand protected float getAsFloat (@Nonnull final String sCellText) { // Ensure that columns without text are sorted consistently compared to the // ones with non-numeric content if (sCellText.isEmpty ()) return Float.MIN_VALUE; return LocaleFormatter.parseFloat (sCellText, m_aParseLocale, 0); }
/** * @param aConversionSettings * The conversion settings to be used * @return The created micro element for this HC element. May not be * <code>null</code>. */ @OverrideOnDemand @Nonnull protected IMicroElement createElement (@Nonnull final IHCConversionSettingsToNode aConversionSettings) { return new MicroElement (CFacebook.FACEBOOK_NAMESPACE_URI, this.m_sElementName); }
/** * Remove all children from this node. * * @return {@link EChange#CHANGED} if at least one child was present, and was * successfully removed, {@link EChange#UNCHANGED} otherwise. */ @OverrideOnDemand @Nonnull protected EChange onRemoveAllChildren () { throw new MicroException ("Cannot remove all children from this node: " + getClass ().getName ()); }
@Nonnull @OverrideOnDemand protected CanonicalizationMethod createCanonicalizationMethod (@Nonnull final XMLSignatureFactory aSignatureFactory) throws Exception { return aSignatureFactory.newCanonicalizationMethod (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, (C14NMethodParameterSpec) null); }
@Nonnull @OverrideOnDemand protected SignatureMethod createSignatureMethod (@Nonnull final XMLSignatureFactory aSignatureFactory) throws Exception { return aSignatureFactory.newSignatureMethod (SignatureMethod.RSA_SHA1, (SignatureMethodParameterSpec) null); }
/** * @return This object as JavaScript object representation. May not be * <code>null</code>. */ @Nonnull @ReturnsMutableCopy @OverrideOnDemand @OverridingMethodsMustInvokeSuper public JSAssocArray getAsJSObject () { return new JSAssocArray ().add (JSON_VALUE, m_sValue).add (JSON_TOKENS, new JSArray ().addAll (m_aTokens)); }
/** * @return This object as JSON object representation. May not be * <code>null</code>. */ @Nonnull @ReturnsMutableCopy @OverrideOnDemand @OverridingMethodsMustInvokeSuper public JsonObject getAsJson () { return new JsonObject ().add (JSON_VALUE, m_sValue).add (JSON_TOKENS, new JsonArray ().addAll (m_aTokens)); }
/** * @return This object as JavaScript object representation. May not be * <code>null</code>. */ @Nonnull @ReturnsMutableCopy @OverrideOnDemand @OverridingMethodsMustInvokeSuper public JSAssocArray getAsJSObject () { return new JSAssocArray ().add (JSON_VALUE, m_sValue).add (JSON_TOKENS, new JSArray ().addAll (m_aTokens)); }