{
try
{
String entryName =
rundata.getParameters().getString(registryEntryName);
PortletInfoEntry regEntry =
(PortletInfoEntry) Registry.getEntry(registry, entryName);
if (regEntry != null)
{
String parameterName =
rundata.getParameters().getString("parameter_name");
if (parameterName != null && parameterName.length() > 0)
{
Parameter parameter = null;
if (regEntry instanceof PortletEntry)
{
parameter = new BaseCachedParameter();
boolean isCachedOnName =
rundata.getParameters().getBoolean(
"cached_on_name",
false);
boolean isCachedOnValue =
rundata.getParameters().getBoolean(
"cached_on_value",
false);
((BaseCachedParameter) parameter).setCachedOnName(
isCachedOnName);
((BaseCachedParameter) parameter).setCachedOnValue(
isCachedOnValue);
}
else
{
parameter = new BaseParameter();
}
String parameterValue =
rundata.getParameters().getString("parameter_value");
boolean isHidden =
rundata.getParameters().getBoolean("is_hidden", false);
String description =
rundata.getParameters().getString("description");
String title = rundata.getParameters().getString("title");
String type = rundata.getParameters().getString("type");
parameter.setName(parameterName);
parameter.setValue(parameterValue);
parameter.setHidden(isHidden);
parameter.setDescription(description);
parameter.setTitle(title);
parameter.setType(type);
String securityRole =
rundata.getParameters().getString("security_role");
String securityRef =
rundata.getParameters().getString("security_ref");
if (securityRole != null && securityRole.length() > 0)
{
BaseSecurity paramSecurity = new BaseSecurity();
paramSecurity.setRole(securityRole);
parameter.setSecurity(paramSecurity);
}
if (securityRef != null && securityRef.length() > 0)
{
BaseSecurityReference paramSecurityRef =
new BaseSecurityReference();
paramSecurityRef.setParent(securityRef);
parameter.setSecurityRef(paramSecurityRef);
}
regEntry.addParameter(parameter);
Registry.addEntry(registry, regEntry);
clearUserData(rundata);
}