From do-not-reply at jboss.org Mon Jun 14 05:43:27 2010
Content-Type: multipart/mixed; boundary="===============6839608119054923228=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: gatein-commits at lists.jboss.org
Subject: [gatein-commits] gatein SVN: r3320 - in components/wsrp/trunk:
wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1 and 1 other
directory.
Date: Mon, 14 Jun 2010 05:43:27 -0400
Message-ID: <201006140943.o5E9hRp6018340@svn01.web.mwc.hst.phx2.redhat.com>
--===============6839608119054923228==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: chris.laprun(a)jboss.com
Date: 2010-06-14 05:43:26 -0400 (Mon, 14 Jun 2010)
New Revision: 3320
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFacto=
ry.java
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/en=
dpoints/v1/PortletManagementEndpoint.java
Log:
- GTNWSRP-43: Replaced direct calls to constructors.
- GTNWSRP-42: Started updating for WSRP 2 type compliance.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTy=
peFactory.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFact=
ory.java 2010-06-14 08:58:54 UTC (rev 3319)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFact=
ory.java 2010-06-14 09:43:26 UTC (rev 3320)
@@ -92,9 +92,10 @@
import static org.gatein.wsrp.WSRPRewritingConstants.*;
=
/**
+ * TODO: NEEDS TO BE UPDATED TO CONFORM TO WSRP 2 XSD, see GTNWSRP-42
+ *
* Creates minimally valid instances of WSRP types, populated with default=
values where possible, as per
- * wsrp_v2_types.xsd. See JBPORTAL-808 for more
- * information.
+ * wsrp_v2_types.xsd.
*
* @author Chris Laprun
* @version $Revision: 11317 $
@@ -212,6 +213,18 @@
return description;
}
=
+ public static GetPortletDescription createGetPortletDescription(Registr=
ationContext registrationContext, PortletContext portletContext, UserContex=
t userContext)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(registrationConte=
xt, "registration context");
+ ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "=
portlet context");
+ ParameterValidation.throwIllegalArgExceptionIfNull(userContext, "use=
r context");
+ GetPortletDescription description =3D new GetPortletDescription();
+ description.setPortletContext(portletContext);
+ description.setRegistrationContext(registrationContext);
+ description.setUserContext(userContext);
+ return description;
+ }
+
/**
* @param registrationContext
* @param portletContext
@@ -239,31 +252,25 @@
return getPortletDescription;
}
=
- /**
- * registrationContext(RegistrationContext)?, portletContext(PortletCon=
text), userContext(UserContext)?,
- * desiredLocales(xsd:string)*
- *
- * @param registrationContext
- * @param portletContext
- * @return
- * @since 2.4.1
- */
- public static GetPortletProperties createGetPortletProperties(Registrat=
ionContext registrationContext, PortletContext portletContext)
+ public static GetPortletProperties createGetPortletProperties(Registrat=
ionContext registrationContext, PortletContext portletContext, UserContext =
userContext, List names)
{
ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "=
PortletContext");
+ ParameterValidation.throwIllegalArgExceptionIfNull(registrationConte=
xt, "RegistrationContext");
+ ParameterValidation.throwIllegalArgExceptionIfNull(userContext, "Use=
rContext");
+ if (!ParameterValidation.existsAndIsNotEmpty(names))
+ {
+ throw new IllegalArgumentException("Must pass a non-null list of =
property names");
+ }
GetPortletProperties properties =3D new GetPortletProperties();
properties.setRegistrationContext(registrationContext);
properties.setPortletContext(portletContext);
+ properties.setUserContext(userContext);
+ properties.getNames().addAll(names);
return properties;
}
=
- /** =3D=3D=3D=3D=3D=3D WSRP Response objects =3D=3D=3D=3D=3D=3D **/
+ /** =3D=3D=3D=3D=3D=3D WSRP Response objects =3D=3D=3D=3D=3D=3D * */
=
- /**
- * ( updateResponse(UpdateResponse) | redirectURL(xsd:string) ), extens=
ions(Extension)*
- *
- * @return
- */
public static BlockingInteractionResponse createBlockingInteractionResp=
onse(UpdateResponse updateResponse)
{
if (updateResponse =3D=3D null)
@@ -275,11 +282,6 @@
return interactionResponse;
}
=
- /**
- * ( updateResponse(UpdateResponse) | redirectURL(xsd:string) ), extens=
ions(Extension)*
- *
- * @return
- */
public static BlockingInteractionResponse createBlockingInteractionResp=
onse(String redirectURL)
{
if (redirectURL =3D=3D null || redirectURL.length() =3D=3D 0)
@@ -291,27 +293,11 @@
return interactionResponse;
}
=
- /**
- * sessionContext(SessionContext)?, portletContext(PortletContext)?, ma=
rkupContext(MarkupContext)?,
- * navigationalState(xsd:string)? newWindowState(xsd:string)?, newMode(=
xsd:string)?
- *
- * @return
- */
public static UpdateResponse createUpdateResponse()
{
return new UpdateResponse();
}
=
- /**
- * portletHandle(xsd:string), markupTypes(MarkupType)+, groupID(xsd:str=
ing)?, description(LocalizedString)?,
- * shortTitle(LocalizedString)?, title(LocalizedString)?, displayName(L=
ocalizedString)?, keywords(LocalizedString)*,
- * userCategories(xsd:string)*, userProfileItems(xsd:string)*, usesMeth=
odGet(xsd:boolean[false])?,
- * defaultMarkupSecure(xsd:boolean[false])?, onlySecure(xsd:boolean[fal=
se])?, userContextStoredInSession(xsd:boolean[false])?,
- * templatesStoredInSession(xsd:boolean[false])?, hasUserSpecificState(=
xsd:boolean[false])?,
- * doesUrlTemplateProcessing(xsd:boolean[false])?, extensions(Extension=
)*
- *
- * @return
- */
public static PortletDescription createPortletDescription(org.gatein.pc=
.api.PortletContext portletContext, List markupTypes)
{
PortletContext context =3D WSRPUtils.convertToWSRPPortletContext(por=
tletContext);
@@ -366,14 +352,6 @@
WSRPConstants.VIEW_MODE, WSRPConstants.NORMAL_WINDOW_STATE);
}
=
- /**
- * secureClientCommunication(xsd:boolean), locales(xsd:string)+, mimeTy=
pes(xsd:string)+, mode(xsd:string),
- * windowState(xsd:string), clientData({@link ClientData})?, navigation=
alState(xsd:string)?,
- * markupCharacterSets(xsd:string)*, validateTag(xsd:string)?, validNew=
Modes(xsd:string)*,
- * validNewWindowStates(xsd:string)*, extensions({@link org.oasis.wsrp.=
v2.Extension})*
- *
- * @return
- */
public static MarkupParams createMarkupParams(boolean secureClientCommu=
nication, List locales,
List mimeTypes, S=
tring mode, String windowState)
{
@@ -412,12 +390,6 @@
return createRuntimeContext(WSRPConstants.NONE_USER_AUTHENTICATION);
}
=
- /**
- * userAuthentication(xsd:string), portletInstanceKey(xsd:string)?, nam=
espacePrefix(xsd:string)?,
- * templates(Templates)?, sessionID(xsd:string)?, extensions(Extension)*
- *
- * @return
- */
public static RuntimeContext createRuntimeContext(String userAuthentica=
tion)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(userAuthen=
tication, "user authentication", "RuntimeContext");
@@ -427,12 +399,6 @@
return runtimeContext;
}
=
- /**
- * portletHandle(xsd:string), portletState(xsd:base64Binary)?, extensio=
ns({@link org.oasis.wsrp.v2.Extension})*
- *
- * @param portletHandle
- * @return
- */
public static PortletContext createPortletContext(String portletHandle)
{
checkPortletHandle(portletHandle);
@@ -443,12 +409,6 @@
}
=
=
- /**
- * @param portletHandle
- * @param portletState
- * @return
- * @since 2.6
- */
public static PortletContext createPortletContext(String portletHandle,=
byte[] portletState)
{
PortletContext pc =3D createPortletContext(portletHandle);
@@ -466,12 +426,6 @@
return createInteractionParams(StateChange.READ_ONLY);
}
=
- /**
- * portletStateChange({@link StateChange}), interactionState(xsd:string=
)?, formParameters(NamedString)*,
- * uploadContexts(UploadContext)*, extensions(Extension)*
- *
- * @return
- */
public static InteractionParams createInteractionParams(StateChange por=
tletStateChange)
{
ParameterValidation.throwIllegalArgExceptionIfNull(portletStateChang=
e, "portletStateChange");
@@ -481,12 +435,6 @@
return interactionParams;
}
=
- /**
- * registrationContext(RegistrationContext)?
- *
- * @param registrationContext
- * @return
- */
public static InitCookie createInitCookie(RegistrationContext registrat=
ionContext)
{
InitCookie initCookie =3D new InitCookie();
@@ -494,15 +442,6 @@
return initCookie;
}
=
- /**
- * requiresRegistration(xsd:boolean), offeredPortlets(PortletDescriptio=
n)*, userCategoryDescriptions(ItemDescription)*,
- * customUserProfileItemDescriptions(ItemDescription)*, customWindowSta=
teDescriptions(ItemDescription)*,
- * customModeDescriptions(ItemDescription)*, requiresInitCookie(CookieP=
rotocol[none])?,
- * registrationPropertyDescription(ModelDescription)?, locales(xsd:stri=
ng)*, resourceList(ResourceList)?,
- * extensions(Extension)*
- *
- * @return
- */
public static ServiceDescription createServiceDescription(boolean requi=
resRegistration)
{
ServiceDescription serviceDescription =3D new ServiceDescription();
@@ -510,11 +449,6 @@
return serviceDescription;
}
=
- /**
- * markupContext(MarkupContext), sessionContext(SessionContext)?, exten=
sions(Extension)*
- *
- * @return
- */
public static MarkupResponse createMarkupResponse(MarkupContext markupC=
ontext)
{
ParameterValidation.throwIllegalArgExceptionIfNull(markupContext, "M=
arkupContext");
@@ -530,11 +464,6 @@
* textual mime types using the syntax specified in RFC1522[14] (e.g. "=
text/html; charset=3DUTF-8"). In this particular
* case this character set MAY be different than the response message.
*
- * useCachedMarkup(xsd:boolean[false])?, mimeType(xsd:string)?, (markup=
String(xsd:string) |
- * markupBinary(xsd:base64Binary)), locale(xsd:string)?, requiresUrlRew=
riting(xsd:boolean[false])?,
- * cacheControl(CacheControl)?, preferredTitle(xsd:string)?, extensions=
(Extension)*
- *
- * @return
*/
public static MarkupContext createMarkupContext(String mediaType, Strin=
g markupString)
{
@@ -550,10 +479,6 @@
}
=
/**
- * useCachedMarkup(xsd:boolean[false])?, mimeType(xsd:string)?, (markup=
String(xsd:string) |
- * markupBinary(xsd:base64Binary)), locale(xsd:string)?, requiresUrlRew=
riting(xsd:boolean[false])?,
- * cacheControl(CacheControl)?, preferredTitle(xsd:string)?, extensions=
(Extension)*
- *
* @param mediaType The mime type of the returned markup. The mimeType =
field MUST be specified whenever markup is
* returned, and if the markupBinary field is used to =
return the markup, the mime type MUST include
* the character set for textual mime types using the =
syntax specified in RFC1522[14] (e.g.
@@ -575,8 +500,6 @@
}
=
/**
- * sessionID(xsd:string), expires(xsd:int), extensions(Extension)*
- *
* @param sessionID An opaque string the Portlet defines for referencin=
g state that is stored locally on the
* Producer. The maximum length of a sessionID is 4096=
characters,
* @param expires Maximum number of seconds between invocations refer=
encing the sessionID before the Producer will
@@ -597,13 +520,7 @@
return sessionContext;
}
=
- /**
- * For UserProfile and related classes, everything is optional so no ne=
ed to have factory methods.
- *
- * userContextKey(xsd:string), userCategories(xsd:string)*, profile(Use=
rProfile)?, extensions(Extension)*
- *
- * @return
- */
+ /** For UserProfile and related classes, everything is optional so no n=
eed to have factory methods. */
public static UserContext createUserContext(String userContextKey)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(userContex=
tKey, "user context key", "UserContext");
@@ -613,10 +530,6 @@
}
=
/**
- * consumerName(xsd:string), consumerAgent(xsd:string), methodGetSuppor=
ted(xsd:boolean), consumerModes(xsd:string)*,
- * consumerWindowStates(xsd:string)*, consumerUserScopes(xsd:string)*, =
customUserProfileData(xsd:string)*,
- * registrationProperties(Property)*, extensions(Extension)*
- *
* @param consumerName A name (preferably unique) that identifies=
the Consumer [R355] An example of such a name
* would be the Consumer's URL.
* @param methodGetSupported A flag that tells the Producer whether the=
Consumer has implemented portlet URLs
@@ -650,11 +563,6 @@
return registrationData;
}
=
- /**
- * ( stringValue(xsd:string) | any* ), @name(xsd:string), @xml:lang
- *
- * @return
- */
public static Property createProperty(String name, String lang, String =
stringValue)
{
// QName.valueOf validates name
@@ -1044,26 +952,19 @@
return clonePortlet;
}
=
- /**
- * registrationContext(RegistrationContext)?, portletHandles(xsd:string=
)+
- *
- * @return
- * @since 2.6
- */
public static DestroyPortlets createDestroyPortlets(RegistrationContext=
registrationContext, List portletHandles)
{
+ ParameterValidation.throwIllegalArgExceptionIfNull(registrationConte=
xt, "RegistrationContext");
ParameterValidation.throwIllegalArgExceptionIfNull(portletHandles, "=
Portlet handles");
- if (portletHandles.isEmpty())
+ if (!ParameterValidation.existsAndIsNotEmpty(portletHandles))
{
throw new IllegalArgumentException("Cannot create a DestroyPortle=
ts with an empty list of portlet handles!");
}
=
DestroyPortlets destroyPortlets =3D new DestroyPortlets();
destroyPortlets.setRegistrationContext(registrationContext);
- if (ParameterValidation.existsAndIsNotEmpty(portletHandles))
- {
- destroyPortlets.getPortletHandles().addAll(portletHandles);
- }
+ destroyPortlets.getPortletHandles().addAll(portletHandles);
+
return destroyPortlets;
}
=
Modified: components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/=
wsrp/endpoints/v1/PortletManagementEndpoint.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/e=
ndpoints/v1/PortletManagementEndpoint.java 2010-06-14 08:58:54 UTC (rev 331=
9)
+++ components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/e=
ndpoints/v1/PortletManagementEndpoint.java 2010-06-14 09:43:26 UTC (rev 332=
0)
@@ -23,6 +23,8 @@
=
package org.gatein.wsrp.endpoints.v1;
=
+import org.gatein.common.util.ParameterValidation;
+import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.endpoints.WSRPBaseEndpoint;
import org.gatein.wsrp.spec.v1.V1ToV2Converter;
@@ -97,15 +99,16 @@
@WebParam(mode =3D WebParam.Mode.OUT, name =3D "extensions", targetN=
amespace =3D "urn:oasis:names:tc:wsrp:v1:types") Holder> =
extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle=
, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1Operation=
Failed
{
- GetPortletPropertyDescription getPortletPropertyDescription =3D new =
GetPortletPropertyDescription();
- getPortletPropertyDescription.setRegistrationContext(V1ToV2Converter=
.toV2RegistrationContext(registrationContext));
- getPortletPropertyDescription.setPortletContext(V1ToV2Converter.toV2=
PortletContext(portletContext));
- getPortletPropertyDescription.setUserContext(V1ToV2Converter.toV2Use=
rContext(userContext));
- getPortletPropertyDescription.getDesiredLocales().addAll(desiredLoca=
les);
- PortletPropertyDescriptionResponse descriptionResponse;
try
{
- descriptionResponse =3D producer.getPortletPropertyDescription(ge=
tPortletPropertyDescription);
+ GetPortletPropertyDescription getPortletPropertyDescription =3D W=
SRPTypeFactory.createGetPortletPropertyDescription(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext),
+ V1ToV2Converter.toV2PortletContext(portletContext),
+ V1ToV2Converter.toV2UserContext(userContext),
+ desiredLocales
+ );
+ PortletPropertyDescriptionResponse descriptionResponse =3D
+ producer.getPortletPropertyDescription(getPortletPropertyDescr=
iption);
=
modelDescription.value =3D V2ToV1Converter.toV1ModelDescription(d=
escriptionResponse.getModelDescription());
resourceList.value =3D V2ToV1Converter.toV1ResourceList(descripti=
onResponse.getResourceList());
@@ -151,16 +154,15 @@
@WebParam(mode =3D WebParam.Mode.OUT, name =3D "extensions", targetN=
amespace =3D "urn:oasis:names:tc:wsrp:v1:types") Holder> =
extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle=
, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1Operation=
Failed
{
- SetPortletProperties setPortletProperties =3D new SetPortletProperti=
es();
- setPortletProperties.setRegistrationContext(V1ToV2Converter.toV2Regi=
strationContext(registrationContext));
- setPortletProperties.setPortletContext(V1ToV2Converter.toV2PortletCo=
ntext(portletContext));
- setPortletProperties.setUserContext(V1ToV2Converter.toV2UserContext(=
userContext));
- setPortletProperties.setPropertyList(V1ToV2Converter.toV2PropertyLis=
t(propertyList));
-
- PortletContext response;
try
{
- response =3D producer.setPortletProperties(setPortletProperties);
+ SetPortletProperties setPortletProperties =3D WSRPTypeFactory.cre=
ateSetPortletProperties(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext),
+ V1ToV2Converter.toV2PortletContext(portletContext),
+ V1ToV2Converter.toV2PropertyList(propertyList));
+ setPortletProperties.setUserContext(V1ToV2Converter.toV2UserConte=
xt(userContext));
+
+ PortletContext response =3D producer.setPortletProperties(setPort=
letProperties);
portletHandle.value =3D response.getPortletHandle();
portletState.value =3D response.getPortletState();
extensions.value =3D WSRPUtils.transform(response.getExtensions()=
, V2ToV1Converter.EXTENSION);
@@ -204,15 +206,15 @@
@WebParam(mode =3D WebParam.Mode.OUT, name =3D "extensions", targetN=
amespace =3D "urn:oasis:names:tc:wsrp:v1:types") Holder> =
extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle=
, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1Operation=
Failed
{
- ClonePortlet clonePortlet =3D new ClonePortlet();
- clonePortlet.setRegistrationContext(V1ToV2Converter.toV2Registration=
Context(registrationContext));
- clonePortlet.setPortletContext(V1ToV2Converter.toV2PortletContext(po=
rtletContext));
- clonePortlet.setUserContext(V1ToV2Converter.toV2UserContext(userCont=
ext));
-
- PortletContext response;
try
{
- response =3D producer.clonePortlet(clonePortlet);
+ ClonePortlet clonePortlet =3D WSRPTypeFactory.createClonePortlet(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext),
+ V1ToV2Converter.toV2PortletContext(portletContext),
+ V1ToV2Converter.toV2UserContext(userContext)
+ );
+
+ PortletContext response =3D producer.clonePortlet(clonePortlet);
portletHandle.value =3D response.getPortletHandle();
portletState.value =3D response.getPortletState();
extensions.value =3D WSRPUtils.transform(response.getExtensions()=
, V2ToV1Converter.EXTENSION);
@@ -257,14 +259,18 @@
@WebParam(mode =3D WebParam.Mode.OUT, name =3D "extensions", targetN=
amespace =3D "urn:oasis:names:tc:wsrp:v1:types") Holder> =
extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle=
, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1Operation=
Failed
{
- GetPortletDescription getPortletDescription =3D new GetPortletDescri=
ption();
- getPortletDescription.setRegistrationContext(V1ToV2Converter.toV2Reg=
istrationContext(registrationContext));
- getPortletDescription.setPortletContext(V1ToV2Converter.toV2PortletC=
ontext(portletContext));
- getPortletDescription.setUserContext(V1ToV2Converter.toV2UserContext=
(userContext));
- getPortletDescription.getDesiredLocales().addAll(desiredLocales);
-
try
{
+ GetPortletDescription getPortletDescription =3D WSRPTypeFactory.c=
reateGetPortletDescription(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext),
+ V1ToV2Converter.toV2PortletContext(portletContext),
+ V1ToV2Converter.toV2UserContext(userContext)
+ );
+ if (ParameterValidation.existsAndIsNotEmpty(desiredLocales))
+ {
+ getPortletDescription.getDesiredLocales().addAll(desiredLocale=
s);
+ }
+
PortletDescriptionResponse description =3D producer.getPortletDes=
cription(getPortletDescription);
=
portletDescription.value =3D V2ToV1Converter.toV1PortletDescripti=
on(description.getPortletDescription());
@@ -311,14 +317,15 @@
@WebParam(mode =3D WebParam.Mode.OUT, name =3D "extensions", targetN=
amespace =3D "urn:oasis:names:tc:wsrp:v1:types") Holder> =
extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle=
, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1Operation=
Failed
{
- GetPortletProperties getPortletProperties =3D new GetPortletProperti=
es();
- getPortletProperties.setRegistrationContext(V1ToV2Converter.toV2Regi=
strationContext(registrationContext));
- getPortletProperties.setPortletContext(V1ToV2Converter.toV2PortletCo=
ntext(portletContext));
- getPortletProperties.setUserContext(V1ToV2Converter.toV2UserContext(=
userContext));
- getPortletProperties.getNames().addAll(names);
-
try
{
+ GetPortletProperties getPortletProperties =3D WSRPTypeFactory.cre=
ateGetPortletProperties(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext),
+ V1ToV2Converter.toV2PortletContext(portletContext),
+ V1ToV2Converter.toV2UserContext(userContext),
+ names
+ );
+
PropertyList result =3D producer.getPortletProperties(getPortletP=
roperties);
=
properties.value =3D WSRPUtils.transform(result.getProperties(), =
V2ToV1Converter.PROPERTY);
@@ -362,14 +369,12 @@
@WebParam(mode =3D WebParam.Mode.OUT, name =3D "extensions", targetN=
amespace =3D "urn:oasis:names:tc:wsrp:v1:types") Holder> =
extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidRegist=
ration, V1OperationFailed
{
- DestroyPortlets destroyPortlets =3D new DestroyPortlets();
- destroyPortlets.setRegistrationContext(V1ToV2Converter.toV2Registrat=
ionContext(registrationContext));
- destroyPortlets.getPortletHandles().addAll(portletHandles);
-
- DestroyPortletsResponse destroyPortletsResponse;
try
{
- destroyPortletsResponse =3D producer.destroyPortlets(destroyPortl=
ets);
+ DestroyPortlets destroyPortlets =3D WSRPTypeFactory.createDestroy=
Portlets(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext), =
portletHandles
+ );
+ DestroyPortletsResponse destroyPortletsResponse =3D producer.dest=
royPortlets(destroyPortlets);
=
destroyFailed.value =3D V2ToV1Converter.toV1DestroyFailed(destroy=
PortletsResponse.getFailedPortlets());
extensions.value =3D WSRPUtils.transform(destroyPortletsResponse.=
getExtensions(), V2ToV1Converter.EXTENSION);
--===============6839608119054923228==--