001: // THIS SOFTWARE IS PROVIDED BY SOFTARIS PTY.LTD. AND OTHER METABOSS
002: // CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
003: // BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
004: // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTARIS PTY.LTD.
005: // OR OTHER METABOSS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
006: // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
007: // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
008: // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
009: // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
010: // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
011: // EVEN IF SOFTARIS PTY.LTD. OR OTHER METABOSS CONTRIBUTORS ARE ADVISED OF THE
012: // POSSIBILITY OF SUCH DAMAGE.
013: //
014: // Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
015: package com.metaboss.sdlctools.models.modelassistant.metabossmodel.implicitselectors;
016:
017: /** Implementation of the simple stylesheet class, which is
018: * responsible for creation of derived names */
019: public class StylesheetImpl {
020: // Helper. Returns the name of the single value entity state selector
021: static String getEntityStateSingleValueSelectorName(
022: String pEntityPluralName) {
023: return pEntityPluralName + "WithEntityState";
024: }
025:
026: // Helper. Returns the name of the plural value entity state selector
027: static String getEntityStatePluralValueSelectorName(
028: String pEntityPluralName) {
029: return pEntityPluralName + "WithEntityStateInList";
030: }
031:
032: // Helper. Returns the name of the single value entity enumerable attribute selector
033: static String getEnumerableAttributeSingleValueSelectorName(
034: String pEntityPluralName, String pAttributeName) {
035: return pEntityPluralName + "With" + pAttributeName;
036: }
037:
038: // Helper. Returns the name of the plural value entity enumerable attribute selector
039: static String getEnumerableAttributePluralValueSelectorName(
040: String pEntityPluralName, String pAttributeName) {
041: return pEntityPluralName + "With" + pAttributeName + "InList";
042: }
043:
044: // Helper. Returns the description of the single value entity state selector
045: static String getEntityStateSingleValueSelectorDescription(
046: String pEntityPluralName) {
047: return "Selects all " + pEntityPluralName
048: + " with state matching the given state.";
049: }
050:
051: // Helper. Returns the description of the plural value entity state selector
052: static String getEntityStatePluralValueSelectorDescription(
053: String pEntityPluralName) {
054: return "Selects all "
055: + pEntityPluralName
056: + " with state matching any one of the states in the given list.";
057: }
058:
059: // Helper. Returns the description of the single value entity enumerable attribute selector
060: static String getEnumerableAttributeSingleValueSelectorDescription(
061: String pEntityPluralName, String pAttributeName) {
062: return "Selects all " + pEntityPluralName
063: + " with value of the " + pAttributeName
064: + " attribute matching given value.";
065: }
066:
067: // Helper. Returns the description of the plural value entity enumerable attribute selector
068: static String getEnumerableAttributePluralValueSelectorDescription(
069: String pEntityPluralName, String pAttributeName) {
070: return "Selects all " + pEntityPluralName
071: + " with value of the " + pAttributeName
072: + " attribute matching any value in the given list.";
073: }
074:
075: // Helper. Returns the name of the entity state single value selector input field
076: static String getEntityStateSingleValueSelectorInputFieldName() {
077: return "DesiredState";
078: }
079:
080: // Helper. Returns the name of the entity state plural value selector input field
081: static String getEntityStatePluralValueSelectorInputFieldName() {
082: return "DesiredStates";
083: }
084:
085: // Helper. Returns the name of the enumerable attribute single value selector input field
086: static String getEnumerableAttributeSingleValueSelectorInputFieldName() {
087: return "DesiredValue";
088: }
089:
090: // Helper. Returns the name of the enumerable attribute plural value selector input field
091: static String getEnumerableAttributePluralValueSelectorInputFieldName() {
092: return "DesiredValues";
093: }
094:
095: // Helper. Returns the description of the entity state single value selector input field
096: static String getEntityStateSingleValueSelectorInputFieldDescription() {
097: return "The state to match";
098: }
099:
100: // Helper. Returns the description of the entity state plural value selector input field
101: static String getEntityStatePluralValueSelectorInputFieldDescription() {
102: return "Collection of states to match";
103: }
104:
105: // Helper. Returns the description of the enumerable attribute single value selector input field
106: static String getEnumerableAttributeSingleValueSelectorInputFieldDescription() {
107: return "The value to match";
108: }
109:
110: // Helper. Returns the description of the enumerable attribute plural value selector input field
111: static String getEnumerableAttributePluralValueSelectorInputFieldDescription() {
112: return "Collection of values to match";
113: }
114: }
|