mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +02:00
Fix javadoc issues in some packages
This commit is contained in:
parent
cb18056613
commit
52398b535f
50 changed files with 255 additions and 56 deletions
|
@ -96,6 +96,7 @@ public interface BytestreamManager {
|
|||
* @throws IOException if an IO error occurred while establishing the session
|
||||
* @throws InterruptedException if the thread was interrupted while waiting in a blocking
|
||||
* operation
|
||||
* @throws SmackException if an error occurs in Smack.
|
||||
*/
|
||||
public BytestreamSession establishSession(Jid targetJID) throws XMPPException, IOException,
|
||||
InterruptedException, SmackException;
|
||||
|
@ -114,6 +115,7 @@ public interface BytestreamManager {
|
|||
* @throws IOException if an IO error occurred while establishing the session
|
||||
* @throws InterruptedException if the thread was interrupted while waiting in a blocking
|
||||
* operation
|
||||
* @throws SmackException if an error occurs in Smack.
|
||||
*/
|
||||
public BytestreamSession establishSession(Jid targetJID, String sessionID)
|
||||
throws XMPPException, IOException, InterruptedException, SmackException;
|
||||
|
|
|
@ -190,7 +190,8 @@ public class InBandBytestreamSession implements BytestreamSession {
|
|||
/**
|
||||
* This method is invoked if one of the streams has been closed locally, if an error occurred
|
||||
* locally or if the whole session should be closed.
|
||||
*
|
||||
*
|
||||
* @param in do we want to close the Input- or OutputStream?
|
||||
* @throws IOException if an error occurs while sending the close request
|
||||
*/
|
||||
protected synchronized void closeByLocal(boolean in) throws IOException {
|
||||
|
|
|
@ -284,6 +284,7 @@ public class Bytestream extends IQ {
|
|||
*
|
||||
* @param JID The JID of the stream host.
|
||||
* @param address The internet address of the stream host.
|
||||
* @param port port of the stream host.
|
||||
*/
|
||||
public StreamHost(final Jid JID, final String address, int port) {
|
||||
this.JID = Objects.requireNonNull(JID, "StreamHost JID must not be null");
|
||||
|
|
|
@ -29,6 +29,9 @@ public interface EntityCapsPersistentCache {
|
|||
|
||||
/**
|
||||
* Lookup DiscoverInfo by a Node string.
|
||||
* @param nodeVer
|
||||
*
|
||||
* @return DiscoverInfo.
|
||||
*/
|
||||
DiscoverInfo lookup(String nodeVer);
|
||||
|
||||
|
|
|
@ -211,7 +211,8 @@ public abstract class AdHocCommand {
|
|||
* Executes the command. This is invoked only on the first stage of the
|
||||
* command. It is invoked on every command. If there is a problem executing
|
||||
* the command it throws an XMPPException.
|
||||
*
|
||||
*
|
||||
* @throws NoResponseException
|
||||
* @throws XMPPErrorException if there is an error executing the command.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
|
@ -226,6 +227,7 @@ public abstract class AdHocCommand {
|
|||
* XMPPException.
|
||||
*
|
||||
* @param response the form answer of the previous stage.
|
||||
* @throws NoResponseException
|
||||
* @throws XMPPErrorException if there is a problem executing the command.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
|
@ -240,6 +242,8 @@ public abstract class AdHocCommand {
|
|||
* XMPPException.
|
||||
*
|
||||
* @param response the form answer of the previous stage.
|
||||
*
|
||||
* @throws NoResponseException
|
||||
* @throws XMPPErrorException if there is a problem executing the command.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
|
@ -251,7 +255,8 @@ public abstract class AdHocCommand {
|
|||
* information of the previous stage. The command must change it state to
|
||||
* the previous one. If there is a problem executing the command it throws
|
||||
* an XMPPException.
|
||||
*
|
||||
*
|
||||
* @throws NoResponseException
|
||||
* @throws XMPPErrorException if there is a problem executing the command.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
|
@ -262,7 +267,8 @@ public abstract class AdHocCommand {
|
|||
* Cancels the execution of the command. This can be invoked on any stage of
|
||||
* the execution. If there is a problem executing the command it throws an
|
||||
* XMPPException.
|
||||
*
|
||||
*
|
||||
* @throws NoResponseException
|
||||
* @throws XMPPErrorException if there is a problem executing the command.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
|
|
|
@ -47,6 +47,8 @@ public class DelayInformation implements ExtensionElement {
|
|||
/**
|
||||
* Creates a new instance with the specified timestamp.
|
||||
* @param stamp the timestamp
|
||||
* @param from sender
|
||||
* @param reason reason of delay.
|
||||
*/
|
||||
public DelayInformation(Date stamp, String from, String reason) {
|
||||
this.stamp = stamp;
|
||||
|
|
|
@ -43,6 +43,9 @@ public interface PrivateDataProvider {
|
|||
*
|
||||
* @param parser an XML parser.
|
||||
* @return a new PrivateData instance.
|
||||
* @throws XmlPullParserException
|
||||
* @throws IOException
|
||||
* @throws SmackException
|
||||
*/
|
||||
PrivateData parsePrivateData(XmlPullParser parser) throws XmlPullParserException, IOException, SmackException;
|
||||
}
|
||||
|
|
|
@ -293,6 +293,8 @@ public final class AccountManager extends Manager {
|
|||
* be performed after a successful login operation has been completed. Not all servers
|
||||
* support changing passwords; an XMPPException will be thrown when that is the case.
|
||||
*
|
||||
* @param newPassword new password.
|
||||
*
|
||||
* @throws IllegalStateException if not currently logged-in to the server.
|
||||
* @throws XMPPErrorException if an error occurs when changing the password.
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
|
|
|
@ -240,6 +240,7 @@ public final class MultiUserChatManager extends Manager {
|
|||
*
|
||||
* @param jid the name of the room in the form "roomName@service", where "service" is the hostname at which the
|
||||
* multi-user chat service is running. Make sure to provide a valid JID.
|
||||
* @return MultiUserChat instance of the room with the given jid.
|
||||
*/
|
||||
public synchronized MultiUserChat getMultiUserChat(EntityBareJid jid) {
|
||||
WeakReference<MultiUserChat> weakRefMultiUserChat = multiUserChats.get(jid);
|
||||
|
|
|
@ -115,6 +115,7 @@ public final class PEPManager extends Manager {
|
|||
* are received from remote XMPP clients.
|
||||
*
|
||||
* @param pepListener a roster exchange listener.
|
||||
* @return true if pepListener was added.
|
||||
*/
|
||||
public boolean addPEPListener(PEPListener pepListener) {
|
||||
return pepListeners.add(pepListener);
|
||||
|
@ -124,6 +125,7 @@ public final class PEPManager extends Manager {
|
|||
* Removes a listener from PEP events.
|
||||
*
|
||||
* @param pepListener a roster exchange listener.
|
||||
* @return true, if pepListener was removed.
|
||||
*/
|
||||
public boolean removePEPListener(PEPListener pepListener) {
|
||||
return pepListeners.remove(pepListener);
|
||||
|
|
|
@ -69,6 +69,7 @@ public class ItemPublishEvent<T extends Item> extends SubscriptionEvent
|
|||
* @param nodeId The id of the node the event came from
|
||||
* @param eventItems The list of {@link Item} that were published
|
||||
* @param subscriptionIds The list of subscriptionIds
|
||||
* @param publishedDate date of publication.
|
||||
*/
|
||||
public ItemPublishEvent(String nodeId, List<T> eventItems, List<String> subscriptionIds, Date publishedDate)
|
||||
{
|
||||
|
@ -107,7 +108,8 @@ public class ItemPublishEvent<T extends Item> extends SubscriptionEvent
|
|||
/**
|
||||
* Gets the original date the items were published. This is only
|
||||
* valid if {@link #isDelayed()} is true.
|
||||
*
|
||||
*
|
||||
* @return date of publication.
|
||||
*/
|
||||
public Date getPublishedDate()
|
||||
{
|
||||
|
|
|
@ -111,6 +111,7 @@ public class ItemsExtension extends NodeExtension implements EmbeddedPacketExten
|
|||
*
|
||||
* @param nodeId The node to which the items are being sent or deleted
|
||||
* @param items The list of {@link Item} or {@link RetractItem}
|
||||
* @param notify
|
||||
*/
|
||||
public ItemsExtension(String nodeId, List<? extends ExtensionElement> items, boolean notify)
|
||||
{
|
||||
|
@ -140,7 +141,7 @@ public class ItemsExtension extends NodeExtension implements EmbeddedPacketExten
|
|||
/**
|
||||
* Gets the items related to the type of request or event.
|
||||
*
|
||||
* return List of {@link Item}, {@link RetractItem}, or null
|
||||
* @return List of {@link Item}, {@link RetractItem}, or null
|
||||
*/
|
||||
public List<? extends ExtensionElement> getItems()
|
||||
{
|
||||
|
|
|
@ -64,7 +64,8 @@ public class LeafNode extends Node
|
|||
|
||||
/**
|
||||
* Get the current items stored in the node.
|
||||
*
|
||||
*
|
||||
* @param <T> type of the items.
|
||||
* @return List of {@link Item} in the node
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
|
@ -83,6 +84,8 @@ public class LeafNode extends Node
|
|||
*
|
||||
* @param subscriptionId - The subscription id for the
|
||||
* associated subscription.
|
||||
* @param <T> type of the items.
|
||||
*
|
||||
* @return List of {@link Item} in the node
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
|
@ -103,7 +106,8 @@ public class LeafNode extends Node
|
|||
* event, that did not include the payload.
|
||||
*
|
||||
* @param ids Item ids of the items to retrieve
|
||||
*
|
||||
* @param <T> type of the items.
|
||||
*
|
||||
* @return The list of {@link Item} with payload
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
|
@ -126,7 +130,8 @@ public class LeafNode extends Node
|
|||
* Get items persisted on the node, limited to the specified number.
|
||||
*
|
||||
* @param maxItems Maximum number of items to return
|
||||
*
|
||||
* @param <T> type of the items.
|
||||
*
|
||||
* @return List of {@link Item}
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
|
@ -148,6 +153,8 @@ public class LeafNode extends Node
|
|||
* on.
|
||||
*
|
||||
* @return List of {@link Item}
|
||||
* @param <T> type of the items.
|
||||
*
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
* @throws NotConnectedException
|
||||
|
@ -170,6 +177,8 @@ public class LeafNode extends Node
|
|||
* This is an optional argument, if provided as null no extensions will be added.
|
||||
* @param returnedExtensions a collection that will be filled with the returned packet
|
||||
* extensions. This is an optional argument, if provided as null it won't be populated.
|
||||
* @param <T> type of the items.
|
||||
*
|
||||
* @return List of {@link Item}
|
||||
* @throws NoResponseException
|
||||
* @throws XMPPErrorException
|
||||
|
@ -236,6 +245,8 @@ public class LeafNode extends Node
|
|||
* For synchronous calls use {@link #send(Item) send(Item))}.
|
||||
*
|
||||
* @param item - The item being sent
|
||||
* @param <T> type of the items.
|
||||
*
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
|
@ -259,6 +270,8 @@ public class LeafNode extends Node
|
|||
* For synchronous calls use {@link #send(Collection) send(Collection))}.
|
||||
*
|
||||
* @param items - The collection of items being sent
|
||||
* @param <T> type of the items.
|
||||
*
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
|
@ -311,6 +324,8 @@ public class LeafNode extends Node
|
|||
* For asynchronous calls, use {@link #publish(Item) publish(Item)}.
|
||||
*
|
||||
* @param item - The item being sent
|
||||
* @param <T> type of the items.
|
||||
*
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
|
@ -337,6 +352,8 @@ public class LeafNode extends Node
|
|||
* For asynchronous calls, use {@link #publish(Collection) publish(Collection))}.
|
||||
*
|
||||
* @param items - The collection of {@link Item} objects being sent
|
||||
* @param <T> type of the items.
|
||||
*
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
|
|
|
@ -384,7 +384,10 @@ abstract public class Node
|
|||
* {@link Subscription.State#unconfigured} - If the {@link Subscription#isConfigRequired()} is true,
|
||||
* the caller must configure the subscription before messages will be received. If it is false
|
||||
* the caller can configure it but is not required to do so.
|
||||
*
|
||||
* @param jid The jid to subscribe as.
|
||||
* @param subForm
|
||||
*
|
||||
* @return The subscription
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
|
@ -434,7 +437,9 @@ abstract public class Node
|
|||
/**
|
||||
* Returns a SubscribeForm for subscriptions, from which you can create an answer form to be submitted
|
||||
* via the {@link #sendConfigurationForm(Form)}.
|
||||
*
|
||||
*
|
||||
* @param jid
|
||||
*
|
||||
* @return A subscription options form
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
|
|
|
@ -225,6 +225,8 @@ public final class PubSubManager extends Manager {
|
|||
* exception if it does not.
|
||||
*
|
||||
* @param id - The unique id of the node
|
||||
* @param <T> type of the node.
|
||||
*
|
||||
* @return the node
|
||||
* @throws XMPPErrorException The node does not exist
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
|
@ -390,6 +392,8 @@ public final class PubSubManager extends Manager {
|
|||
*
|
||||
* @param id The unique id of the node.
|
||||
* @param item The item to publish.
|
||||
* @param <I> type of the item.
|
||||
*
|
||||
* @return the LeafNode on which the item was published.
|
||||
* @throws NoResponseException
|
||||
* @throws XMPPErrorException
|
||||
|
|
|
@ -43,6 +43,7 @@ public class ReportedData {
|
|||
* extension that matches the elementName and namespace "x","jabber:x:data".
|
||||
*
|
||||
* @param packet the stanza(/packet) used for reporting data.
|
||||
* @return ReportedData from the packet if present, otherwise null.
|
||||
*/
|
||||
public static ReportedData getReportedDataFrom(Stanza packet) {
|
||||
// Check if the packet includes the DataForm extension
|
||||
|
|
|
@ -92,6 +92,8 @@ public final class VCardManager extends Manager {
|
|||
* Save this vCard for the user connected by 'connection'. XMPPConnection should be authenticated
|
||||
* and not anonymous.
|
||||
*
|
||||
* @param vcard VCard.
|
||||
*
|
||||
* @throws XMPPErrorException thrown if there was an issue setting the VCard in the server.
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
* @throws NotConnectedException
|
||||
|
@ -110,6 +112,7 @@ public final class VCardManager extends Manager {
|
|||
/**
|
||||
* Load the VCard of the current user.
|
||||
*
|
||||
* @return VCard.
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
|
@ -122,6 +125,9 @@ public final class VCardManager extends Manager {
|
|||
/**
|
||||
* Load VCard information for a given user.
|
||||
*
|
||||
* @param bareJid bareJid of the user.
|
||||
*
|
||||
* @return VCard.
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
* @throws NotConnectedException
|
||||
|
|
|
@ -135,10 +135,11 @@ public class VCard extends IQ {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set generic VCard field.
|
||||
* Get the content of a generic VCard field.
|
||||
*
|
||||
* @param field value of field. Possible values: NICKNAME, PHOTO, BDAY, JABBERID, MAILER, TZ,
|
||||
* GEO, TITLE, ROLE, LOGO, NOTE, PRODID, REV, SORT-STRING, SOUND, UID, URL, DESC.
|
||||
* @return content of field.
|
||||
*/
|
||||
public String getField(String field) {
|
||||
return otherSimpleFields.get(field);
|
||||
|
@ -273,6 +274,7 @@ public class VCard extends IQ {
|
|||
*
|
||||
* @param addrField one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
|
||||
* LOCALITY, REGION, PCODE, CTRY
|
||||
* @return content of home address field.
|
||||
*/
|
||||
public String getAddressFieldHome(String addrField) {
|
||||
return homeAddr.get(addrField);
|
||||
|
@ -283,6 +285,7 @@ public class VCard extends IQ {
|
|||
*
|
||||
* @param addrField one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
|
||||
* LOCALITY, REGION, PCODE, CTRY
|
||||
* @param value new value for the field.
|
||||
*/
|
||||
public void setAddressFieldHome(String addrField, String value) {
|
||||
homeAddr.put(addrField, value);
|
||||
|
@ -293,6 +296,7 @@ public class VCard extends IQ {
|
|||
*
|
||||
* @param addrField one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
|
||||
* LOCALITY, REGION, PCODE, CTRY
|
||||
* @return content of work address field.
|
||||
*/
|
||||
public String getAddressFieldWork(String addrField) {
|
||||
return workAddr.get(addrField);
|
||||
|
@ -303,6 +307,7 @@ public class VCard extends IQ {
|
|||
*
|
||||
* @param addrField one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
|
||||
* LOCALITY, REGION, PCODE, CTRY
|
||||
* @param value new value for the field.
|
||||
*/
|
||||
public void setAddressFieldWork(String addrField, String value) {
|
||||
workAddr.put(addrField, value);
|
||||
|
@ -323,6 +328,7 @@ public class VCard extends IQ {
|
|||
* Get home phone number.
|
||||
*
|
||||
* @param phoneType one of VOICE, FAX, PAGER, MSG, CELL, VIDEO, BBS, MODEM, ISDN, PCS, PREF
|
||||
* @return content of home phone number.
|
||||
*/
|
||||
public String getPhoneHome(String phoneType) {
|
||||
return homePhones.get(phoneType);
|
||||
|
@ -342,6 +348,7 @@ public class VCard extends IQ {
|
|||
* Get work phone number.
|
||||
*
|
||||
* @param phoneType one of VOICE, FAX, PAGER, MSG, CELL, VIDEO, BBS, MODEM, ISDN, PCS, PREF
|
||||
* @return content of work phone number.
|
||||
*/
|
||||
public String getPhoneWork(String phoneType) {
|
||||
return workPhones.get(phoneType);
|
||||
|
@ -470,6 +477,8 @@ public class VCard extends IQ {
|
|||
* Common code for getting the bytes of a url.
|
||||
*
|
||||
* @param url the url to read.
|
||||
* @return bytes of the file pointed to by URL.
|
||||
* @throws IOException if an IOException occurs while reading the file.
|
||||
*/
|
||||
public static byte[] getBytes(URL url) throws IOException {
|
||||
final String path = url.getPath();
|
||||
|
@ -557,6 +566,8 @@ public class VCard extends IQ {
|
|||
/**
|
||||
* Load VCard information for a connected user. XMPPConnection should be authenticated
|
||||
* and not anonymous.
|
||||
*
|
||||
* @param connection connection.
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
|
@ -570,6 +581,10 @@ public class VCard extends IQ {
|
|||
|
||||
/**
|
||||
* Load VCard information for a given user. XMPPConnection should be authenticated and not anonymous.
|
||||
*
|
||||
* @param connection connection.
|
||||
* @param user user whos information we want to load.
|
||||
*
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
* @throws NotConnectedException
|
||||
|
|
|
@ -52,6 +52,8 @@ public class DataLayout implements ExtensionElement {
|
|||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list: {@link String },
|
||||
* {@link Section }, {@link Fieldref } and {@link Reportedref }
|
||||
*
|
||||
* @return list of DataFormLayoutElements.
|
||||
*/
|
||||
public List<DataFormLayoutElement> getPageLayout() {
|
||||
return this.pageLayout;
|
||||
|
@ -177,6 +179,8 @@ public class DataLayout implements ExtensionElement {
|
|||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list: {@link String },
|
||||
* {@link Section }, {@link Fieldref } and {@link Reportedref }
|
||||
*
|
||||
* @return list of DataFormLayoutElements.
|
||||
*/
|
||||
public List<DataFormLayoutElement> getSectionLayout() {
|
||||
return this.sectionLayout;
|
||||
|
|
|
@ -51,6 +51,7 @@ public class XHTMLText {
|
|||
*
|
||||
* @param href indicates the URL being linked to
|
||||
* @param style the XHTML style of the anchor
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendOpenAnchorTag(String href, String style) {
|
||||
text.halfOpenElement(A);
|
||||
|
@ -62,7 +63,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates that an anchor section ends.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseAnchorTag() {
|
||||
text.closeElement(A);
|
||||
|
@ -74,6 +76,7 @@ public class XHTMLText {
|
|||
* Appends a tag that indicates that a blockquote section begins.
|
||||
*
|
||||
* @param style the XHTML style of the blockquote
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendOpenBlockQuoteTag(String style) {
|
||||
text.halfOpenElement(BLOCKQUOTE);
|
||||
|
@ -84,7 +87,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates that a blockquote section ends.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseBlockQuoteTag() {
|
||||
text.closeElement(BLOCKQUOTE);
|
||||
|
@ -96,6 +100,7 @@ public class XHTMLText {
|
|||
*
|
||||
* @param style the XHTML style of the body
|
||||
* @param lang the language of the body
|
||||
* @return this.
|
||||
*/
|
||||
private XHTMLText appendOpenBodyTag(String style, String lang) {
|
||||
text.halfOpenElement(Message.BODY);
|
||||
|
@ -106,6 +111,11 @@ public class XHTMLText {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends a tag that indicates that the body section ends.
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseBodyTag() {
|
||||
text.closeElement(Message.BODY);
|
||||
return this;
|
||||
|
@ -117,7 +127,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that inserts a single carriage return.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendBrTag() {
|
||||
text.emptyElement(BR);
|
||||
|
@ -126,7 +137,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates a reference to work, such as a book, report or web site.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendOpenCiteTag() {
|
||||
text.openElement(CITE);
|
||||
|
@ -135,7 +147,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates text that is the code for a program.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendOpenCodeTag() {
|
||||
text.openElement(CODE);
|
||||
|
@ -144,7 +157,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates end of text that is the code for a program.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseCodeTag() {
|
||||
text.closeElement(CODE);
|
||||
|
@ -155,7 +169,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates emphasis.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendOpenEmTag() {
|
||||
text.openElement(EM);
|
||||
|
@ -164,7 +179,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates end of emphasis.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseEmTag() {
|
||||
text.closeElement(EM);
|
||||
|
@ -178,6 +194,8 @@ public class XHTMLText {
|
|||
*
|
||||
* @param level the level of the Header. It must be a value between 1 and 3
|
||||
* @param style the XHTML style of the blockquote
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendOpenHeaderTag(int level, String style) {
|
||||
if (level > 3 || level < 1) {
|
||||
|
@ -193,6 +211,7 @@ public class XHTMLText {
|
|||
* Appends a tag that indicates that a header section ends.
|
||||
*
|
||||
* @param level the level of the Header. It must be a value between 1 and 3
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseHeaderTag(int level) {
|
||||
if (level > 3 || level < 1) {
|
||||
|
@ -212,6 +231,8 @@ public class XHTMLText {
|
|||
* @param height how tall is the picture
|
||||
* @param src where to get the picture
|
||||
* @param width how wide is the picture
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendImageTag(String align, String alt, String height, String src, String width) {
|
||||
text.halfOpenElement(IMG);
|
||||
|
@ -231,6 +252,8 @@ public class XHTMLText {
|
|||
* Appends a tag that indicates the start of a new line item within a list.
|
||||
*
|
||||
* @param style the style of the line item
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendLineItemTag(String style) {
|
||||
text.halfOpenElement(LI);
|
||||
|
@ -242,6 +265,7 @@ public class XHTMLText {
|
|||
/**
|
||||
* Appends a tag that indicates that a line item section ends.
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseLineItemTag() {
|
||||
text.closeElement(LI);
|
||||
|
@ -253,6 +277,8 @@ public class XHTMLText {
|
|||
* in the list is important. To show this, browsers automatically number the list.
|
||||
*
|
||||
* @param style the style of the ordered list
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendOpenOrderedListTag(String style) {
|
||||
text.halfOpenElement(OL);
|
||||
|
@ -263,7 +289,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates that an ordered list section ends.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseOrderedListTag() {
|
||||
text.closeElement(OL);
|
||||
|
@ -277,6 +304,8 @@ public class XHTMLText {
|
|||
* in the list are not in any particular order.
|
||||
*
|
||||
* @param style the style of the unordered list
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendOpenUnorderedListTag(String style) {
|
||||
text.halfOpenElement(UL);
|
||||
|
@ -287,7 +316,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates that an unordered list section ends.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseUnorderedListTag() {
|
||||
text.closeElement(UL);
|
||||
|
@ -301,6 +331,8 @@ public class XHTMLText {
|
|||
* with two carriage returns, producing a single blank line in between the two paragraphs.
|
||||
*
|
||||
* @param style the style of the paragraph
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendOpenParagraphTag(String style) {
|
||||
text.halfOpenElement(P);
|
||||
|
@ -312,7 +344,8 @@ public class XHTMLText {
|
|||
/**
|
||||
* Appends a tag that indicates the end of a new paragraph. This is usually rendered
|
||||
* with two carriage returns, producing a single blank line in between the two paragraphs.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseParagraphTag() {
|
||||
text.closeElement(P);
|
||||
|
@ -325,6 +358,8 @@ public class XHTMLText {
|
|||
* Appends a tag that indicates that an inlined quote section begins.
|
||||
*
|
||||
* @param style the style of the inlined quote
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendOpenInlinedQuoteTag(String style) {
|
||||
text.halfOpenElement(Q);
|
||||
|
@ -335,7 +370,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates that an inlined quote section ends.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseInlinedQuoteTag() {
|
||||
text.closeElement(Q);
|
||||
|
@ -348,6 +384,8 @@ public class XHTMLText {
|
|||
* Appends a tag that allows to set the fonts for a span of text.
|
||||
*
|
||||
* @param style the style for a span of text
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendOpenSpanTag(String style) {
|
||||
text.halfOpenElement(SPAN);
|
||||
|
@ -358,7 +396,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates that a span section ends.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseSpanTag() {
|
||||
text.closeElement(SPAN);
|
||||
|
@ -369,7 +408,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates text which should be more forceful than surrounding text.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendOpenStrongTag() {
|
||||
text.openElement(STRONG);
|
||||
|
@ -378,7 +418,8 @@ public class XHTMLText {
|
|||
|
||||
/**
|
||||
* Appends a tag that indicates that a strong section ends.
|
||||
*
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText appendCloseStrongTag() {
|
||||
text.closeElement(STRONG);
|
||||
|
@ -388,7 +429,9 @@ public class XHTMLText {
|
|||
/**
|
||||
* Appends a given text to the XHTMLText.
|
||||
*
|
||||
* @param textToAppend the text to append
|
||||
* @param textToAppend the text to append
|
||||
*
|
||||
* @return this.
|
||||
*/
|
||||
public XHTMLText append(String textToAppend) {
|
||||
text.escape(textToAppend);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue