001: /*
002: * File: roAck.java
003: * Project: jMOS, com.aranova.java.jmos.messages.profile2
004: * Revision: 0.9.1
005: * Date: 18-ene-2006 10:11:19
006: *
007: * Copyright (C) Aragón Innovación Tecnológica S.L.L.
008: * All rights reserved.
009: *
010: * This software is distributed under the terms of the Aranova License version 1.0.
011: * See the terms of the Aranova License in the documentation provided with this software.
012: */
013:
014: package com.aranova.java.jmos.messages.profile2;
015:
016: import java.util.LinkedHashSet;
017: import java.util.Set;
018:
019: import com.aranova.java.jmos.annotations.MOSAttribute;
020: import com.aranova.java.jmos.annotations.MOSMessage;
021: import com.aranova.java.jmos.enums.TypeModifier;
022: import com.aranova.java.jmos.enums.TypePort;
023: import com.aranova.java.jmos.messages.Message;
024: import com.aranova.java.jmos.messages.profile.roAckStatus;
025:
026: /**
027: * Profile 2 - Acknowledge Running Order.<BR>
028: * <b>Purpose</b><BR>
029: * MOS response to receipt of any Running Order command. The response may contain the status for one or more Items in a Running Order. This is useful when the roAck is in response to a roCreate or roReplace command.<BR>
030: * <b>Response</b><BR>
031: * None<BR>
032: * <b>Port</b><BR>
033: * MOS Upper Port (10541) - Running Order<BR>
034: *
035: * @author <a href="http://www.aranova.net/contactar/">Daniel Sánchez</a>
036: * @version 0.9.1
037: * @since 0.9.1
038: */
039: @MOSMessage(name="roAck",profile=2,port=TypePort.UpperPort)
040: public class roAck extends Message {
041: @MOSAttribute(name="roID",maxLength=128)
042: private String _roID;
043: @MOSAttribute(name="roStatus",maxLength=128)
044: private String _roStatus;
045: @MOSAttribute(name="roAckStatus",modifier=TypeModifier.ZeroOrMore,writeTag=false)
046: private Set<roAckStatus> _roAckStatus = new LinkedHashSet<roAckStatus>();
047: private roAckStatus _ackStatusTemp;
048:
049: /**
050: * @return Returns the roAckStatus.
051: */
052: public Set<roAckStatus> getRoAckStatus() {
053: return _roAckStatus;
054: }
055:
056: /**
057: * @return Returns the roID.
058: */
059: public String getRoID() {
060: return _roID;
061: }
062:
063: /**
064: * @param roID The roID to set.
065: */
066: public void setRoID(final String roID) {
067: _roID = roID;
068: }
069:
070: /**
071: * @return Returns the roStatus.
072: */
073: public String getRoStatus() {
074: return _roStatus;
075: }
076:
077: /**
078: * @param roStatus The roStatus to set.
079: */
080: public void setRoStatus(final String roStatus) {
081: _roStatus = roStatus;
082: }
083:
084: /* (non-Javadoc)
085: * @see com.aranova.java.jmos.messages.Message#set(java.lang.String, java.lang.Object)
086: */
087: @Override
088: public void set(final String name, final Object value) {
089: if (name.equals("storyID")) {
090: _ackStatusTemp = new roAckStatus();
091: _ackStatusTemp.set(name, value);
092: } else if (name.equals("itemID") || name.equals("objID")
093: || name.equals("itemChannel")) {
094: _ackStatusTemp.set(name, value);
095: } else if (name.equals("status")) {
096: _ackStatusTemp.set(name, value);
097: _roAckStatus.add(_ackStatusTemp);
098: _ackStatusTemp = null;
099: } else {
100: super.set(name, value);
101: }
102: }
103: }
|