325N/A/*
325N/A * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
325N/A *
325N/A * This code is free software; you can redistribute it and/or modify it
325N/A * under the terms of the GNU General Public License version 2 only, as
325N/A * published by the Free Software Foundation. Oracle designates this
325N/A * particular file as subject to the "Classpath" exception as provided
325N/A * by Oracle in the LICENSE file that accompanied this code.
325N/A *
325N/A * This code is distributed in the hope that it will be useful, but WITHOUT
325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
325N/A * version 2 for more details (a copy is included in the LICENSE file that
325N/A * accompanied this code).
325N/A *
325N/A * You should have received a copy of the GNU General Public License version
325N/A * 2 along with this work; if not, write to the Free Software Foundation,
325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
325N/A *
325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
325N/A * or visit www.oracle.com if you need additional information or have any
325N/A * questions.
325N/A */
325N/A
325N/Apackage com.sun.xml.internal.ws.api.model;
325N/A
325N/Aimport com.sun.xml.internal.bind.api.Bridge;
325N/A
325N/Aimport javax.xml.namespace.QName;
325N/Aimport javax.xml.ws.Holder;
325N/Aimport javax.jws.WebParam;
325N/Aimport javax.jws.WebParam.Mode;
325N/A
325N/A/**
325N/A * Runtime Parameter that abstracts the annotated java parameter
325N/A * <p/>
325N/A * <p/>
325N/A * A parameter may be bound to a header, a body, or an attachment.
325N/A * Note that when it's bound to a body, it's bound to a body,
325N/A * it binds to the whole payload.
325N/A * <p/>
325N/A * <p/>
325N/A * Sometimes multiple Java parameters are packed into the payload,
325N/A * in which case the subclass {@link com.sun.xml.internal.ws.model.WrapperParameter} is used.
325N/A *
325N/A * @author Vivek Pandey
325N/A */
325N/Apublic interface Parameter {
325N/A /**
325N/A * Gets the root {@link SEIModel} that owns this model.
325N/A */
325N/A SEIModel getOwner();
325N/A
325N/A /**
325N/A * Gets the parent {@link JavaMethod} to which this parameter belongs.
325N/A */
325N/A JavaMethod getParent();
325N/A
325N/A /**
325N/A * @return Returns the {@link QName} of the payload/infoset of a SOAP body or header.
325N/A */
325N/A QName getName();
325N/A
325N/A /**
325N/A * Gives the {@link Bridge} associated with this Parameter
325N/A */
325N/A Bridge getBridge();
325N/A
325N/A /**
325N/A * @return Returns the mode, such as IN, OUT or INOUT.
325N/A */
325N/A Mode getMode();
325N/A
325N/A /**
325N/A * Position of a parameter in the method signature. It would be -1 if the parameter is a return.
325N/A *
325N/A * @return Returns the index.
325N/A */
325N/A int getIndex();
325N/A
325N/A /**
325N/A * @return true if <tt>this instanceof {@link com.sun.xml.internal.ws.model.WrapperParameter}</tt>.
325N/A */
325N/A boolean isWrapperStyle();
325N/A
325N/A /**
325N/A * Returns true if this parameter is bound to the return value from the {@link JavaMethod}.
325N/A *
325N/A * <p>
325N/A * Just the convenience method for <tt>getIndex()==-1</tt>
325N/A */
325N/A boolean isReturnValue();
325N/A
325N/A /**
325N/A * Returns the binding associated with the parameter. For IN parameter the binding will be
325N/A * same as {@link #getInBinding()}, for OUT parameter the binding will be same as
325N/A * {@link #getOutBinding()} and for INOUT parameter the binding will be same as calling
325N/A * {@link #getInBinding()}
325N/A *
325N/A * @return the Binding for this Parameter. Returns {@link ParameterBinding#BODY} by default.
325N/A */
325N/A ParameterBinding getBinding();
325N/A
325N/A /**
325N/A * Returns the {@link ParameterBinding} associated with the IN mode
325N/A *
325N/A * @return the binding
325N/A */
325N/A ParameterBinding getInBinding();
325N/A
325N/A /**
325N/A * Returns the {@link ParameterBinding} associated with the OUT mode
325N/A *
325N/A * @return the binding
325N/A */
325N/A ParameterBinding getOutBinding();
325N/A
325N/A /**
325N/A * @return true if the {@link Mode} associated with the parameter is {@link Mode#IN} and false otherwise.
325N/A */
325N/A boolean isIN();
325N/A
325N/A /**
325N/A * @return true if the {@link Mode} associated with the parameter is {@link Mode#OUT} and false otherwise.
325N/A */
325N/A boolean isOUT();
325N/A
325N/A /**
325N/A * @return true if the {@link Mode} associated with the parameter is {@link Mode#INOUT} and false otherwise.
325N/A */
325N/A boolean isINOUT();
325N/A
325N/A /**
325N/A * If true, this parameter maps to the return value of a method invocation.
325N/A *
325N/A * <p>
325N/A * {@link JavaMethod#getResponseParameters()} is guaranteed to have
325N/A * at most one such {@link Parameter}. Note that there coule be none,
325N/A * in which case the method returns <tt>void</tt>.
325N/A *
325N/A * <p>
325N/A * Other response parameters are bound to {@link Holder}.
325N/A */
325N/A boolean isResponse();
325N/A
325N/A /**
325N/A * Gets the holder value if applicable. To be called for inbound client side
325N/A * message.
325N/A *
325N/A * @param obj
325N/A * @return the holder value if applicable.
325N/A */
325N/A Object getHolderValue(Object obj);
325N/A
325N/A /**
325N/A * Gives the wsdl:part@name value
325N/A *
325N/A * @return Value of {@link WebParam#partName()} annotation if present,
325N/A * otherwise its the localname of the infoset associated with the parameter
325N/A */
325N/A String getPartName();
325N/A}