id
int32 0
12.9k
| code
sequencelengths 2
264k
|
---|---|
12,300 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
";",
"public",
"class",
"WSRPService",
"<",
"T",
">",
"{",
"protected",
"T",
"service",
";",
"public",
"WSRPService",
"(",
"T",
"service",
")",
"{",
"this",
".",
"service",
"=",
"service",
";",
"}",
"}",
"</s>"
] |
12,301 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"util",
".",
"Version",
";",
"public",
"interface",
"ServiceFactory",
"{",
"int",
"DEFAULT_TIMEOUT_MS",
"=",
"10000",
";",
"Version",
"WSRP2",
"=",
"new",
"Version",
"(",
"\"WSRP\"",
",",
"2",
",",
"0",
",",
"0",
",",
"new",
"Version",
".",
"Qualifier",
"(",
"Version",
".",
"Qualifier",
".",
"Prefix",
".",
"GA",
")",
",",
"\"WSRP2\"",
")",
";",
"Version",
"WSRP1",
"=",
"new",
"Version",
"(",
"\"WSRP\"",
",",
"1",
",",
"0",
",",
"0",
",",
"new",
"Version",
".",
"Qualifier",
"(",
"Version",
".",
"Qualifier",
".",
"Prefix",
".",
"GA",
")",
",",
"\"WSRP1\"",
")",
";",
"<",
"T",
">",
"T",
"getService",
"(",
"Class",
"<",
"T",
">",
"clazz",
")",
"throws",
"Exception",
";",
"boolean",
"isAvailable",
"(",
")",
";",
"boolean",
"isFailed",
"(",
")",
";",
"void",
"start",
"(",
")",
"throws",
"Exception",
";",
"void",
"stop",
"(",
")",
";",
"void",
"setWsdlDefinitionURL",
"(",
"String",
"wsdlDefinitionURL",
")",
";",
"String",
"getWsdlDefinitionURL",
"(",
")",
";",
"void",
"setWSOperationTimeOut",
"(",
"int",
"msBeforeTimeOut",
")",
";",
"int",
"getWSOperationTimeOut",
"(",
")",
";",
"ServiceDescriptionService",
"getServiceDescriptionService",
"(",
")",
"throws",
"Exception",
";",
"MarkupService",
"getMarkupService",
"(",
")",
"throws",
"Exception",
";",
"PortletManagementService",
"getPortletManagementService",
"(",
")",
"throws",
"Exception",
";",
"RegistrationService",
"getRegistrationService",
"(",
")",
"throws",
"Exception",
";",
"Version",
"getWSRPVersion",
"(",
")",
";",
"boolean",
"refresh",
"(",
"boolean",
"force",
")",
"throws",
"Exception",
";",
"void",
"enableWSS",
"(",
"boolean",
"enable",
")",
";",
"boolean",
"isWSSEnabled",
"(",
")",
";",
"boolean",
"isWSSAvailable",
"(",
")",
";",
"}",
"</s>"
] |
12,302 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"handler",
";",
"import",
"org",
".",
"apache",
".",
"commons",
".",
"httpclient",
".",
"Cookie",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"handlers",
".",
"ProducerSessionInformation",
";",
"import",
"javax",
".",
"xml",
".",
"namespace",
".",
"QName",
";",
"import",
"javax",
".",
"xml",
".",
"soap",
".",
"MimeHeaders",
";",
"import",
"javax",
".",
"xml",
".",
"soap",
".",
"SOAPMessage",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"BindingProvider",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"handler",
".",
"MessageContext",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"handler",
".",
"soap",
".",
"SOAPHandler",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"handler",
".",
"soap",
".",
"SOAPMessageContext",
";",
"import",
"java",
".",
"net",
".",
"MalformedURLException",
";",
"import",
"java",
".",
"net",
".",
"URL",
";",
"import",
"java",
".",
"util",
".",
"Collections",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"public",
"class",
"RequestHeaderClientHandler",
"implements",
"SOAPHandler",
"<",
"SOAPMessageContext",
">",
"{",
"private",
"static",
"final",
"ThreadLocal",
"<",
"CurrentInfo",
">",
"local",
"=",
"new",
"ThreadLocal",
"<",
"CurrentInfo",
">",
"(",
")",
";",
"private",
"static",
"final",
"String",
"EMPTY",
"=",
"\"\"",
";",
"public",
"Set",
"<",
"QName",
">",
"getHeaders",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"boolean",
"handleMessage",
"(",
"SOAPMessageContext",
"soapMessageContext",
")",
"{",
"if",
"(",
"Boolean",
".",
"TRUE",
".",
"equals",
"(",
"soapMessageContext",
".",
"get",
"(",
"MessageContext",
".",
"MESSAGE_OUTBOUND_PROPERTY",
")",
")",
")",
"{",
"return",
"handleRequest",
"(",
"soapMessageContext",
")",
";",
"}",
"else",
"{",
"return",
"handleResponse",
"(",
"soapMessageContext",
")",
";",
"}",
"}",
"public",
"boolean",
"handleFault",
"(",
"SOAPMessageContext",
"soapMessageContext",
")",
"{",
"return",
"true",
";",
"}",
"public",
"void",
"close",
"(",
"MessageContext",
"messageContext",
")",
"{",
"}",
"public",
"boolean",
"handleRequest",
"(",
"SOAPMessageContext",
"msgContext",
")",
"{",
"CurrentInfo",
"info",
"=",
"getCurrentInfo",
"(",
"false",
")",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"ProducerSessionInformation",
"sessionInfo",
"=",
"info",
".",
"sessionInfo",
";",
"if",
"(",
"sessionInfo",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"SOAPMessage",
"message",
"=",
"msgContext",
".",
"getMessage",
"(",
")",
";",
"String",
"cookie",
"=",
"createCookie",
"(",
"info",
",",
"sessionInfo",
")",
";",
"if",
"(",
"cookie",
".",
"length",
"(",
")",
"!=",
"0",
")",
"{",
"MimeHeaders",
"mimeHeaders",
"=",
"message",
".",
"getMimeHeaders",
"(",
")",
";",
"mimeHeaders",
".",
"setHeader",
"(",
"CookieUtil",
".",
"COOKIE",
",",
"cookie",
")",
";",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"httpHeaders",
"=",
"new",
"HashMap",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"(",
")",
";",
"httpHeaders",
".",
"put",
"(",
"CookieUtil",
".",
"COOKIE",
",",
"Collections",
".",
"singletonList",
"(",
"cookie",
")",
")",
";",
"msgContext",
".",
"put",
"(",
"MessageContext",
".",
"HTTP_REQUEST_HEADERS",
",",
"httpHeaders",
")",
";",
"}",
"return",
"true",
";",
"}",
"public",
"static",
"String",
"createCookie",
"(",
"ProducerSessionInformation",
"sessionInformation",
")",
"{",
"CurrentInfo",
"currentInfo",
"=",
"getCurrentInfo",
"(",
"false",
")",
";",
"if",
"(",
"currentInfo",
"!=",
"null",
")",
"{",
"return",
"createCookie",
"(",
"currentInfo",
",",
"sessionInformation",
")",
";",
"}",
"else",
"{",
"return",
"EMPTY",
";",
"}",
"}",
"private",
"static",
"String",
"createCookie",
"(",
"CurrentInfo",
"info",
",",
"ProducerSessionInformation",
"sessionInfo",
")",
"{",
"StringBuilder",
"cookie",
"=",
"new",
"StringBuilder",
"(",
"128",
")",
";",
"if",
"(",
"sessionInfo",
".",
"isPerGroupCookies",
"(",
")",
")",
"{",
"if",
"(",
"info",
".",
"groupId",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"\"",
")",
";",
"}",
"String",
"groupCookie",
"=",
"sessionInfo",
".",
"getGroupCookieFor",
"(",
"info",
".",
"groupId",
")",
";",
"if",
"(",
"groupCookie",
"!=",
"null",
")",
"{",
"cookie",
".",
"append",
"(",
"groupCookie",
")",
";",
"}",
"}",
"String",
"userCookie",
"=",
"sessionInfo",
".",
"getUserCookie",
"(",
")",
";",
"if",
"(",
"userCookie",
"!=",
"null",
")",
"{",
"if",
"(",
"cookie",
".",
"length",
"(",
")",
"!=",
"0",
")",
"{",
"cookie",
".",
"append",
"(",
"','",
")",
";",
"}",
"cookie",
".",
"append",
"(",
"userCookie",
")",
";",
"}",
"return",
"cookie",
".",
"toString",
"(",
")",
";",
"}",
"public",
"boolean",
"handleResponse",
"(",
"MessageContext",
"msgContext",
")",
"{",
"SOAPMessageContext",
"smc",
"=",
"(",
"SOAPMessageContext",
")",
"msgContext",
";",
"SOAPMessage",
"message",
"=",
"smc",
".",
"getMessage",
"(",
")",
";",
"MimeHeaders",
"mimeHeaders",
"=",
"message",
".",
"getMimeHeaders",
"(",
")",
";",
"String",
"[",
"]",
"cookieValues",
"=",
"mimeHeaders",
".",
"getHeader",
"(",
"CookieUtil",
".",
"SET_COOKIE",
")",
";",
"if",
"(",
"cookieValues",
"==",
"null",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"httpHeaders",
"=",
"(",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
")",
"smc",
".",
"get",
"(",
"MessageContext",
".",
"HTTP_RESPONSE_HEADERS",
")",
";",
"List",
"<",
"String",
">",
"l",
"=",
"httpHeaders",
".",
"get",
"(",
"CookieUtil",
".",
"SET_COOKIE",
")",
";",
"if",
"(",
"l",
"!=",
"null",
"&&",
"!",
"l",
".",
"isEmpty",
"(",
")",
")",
"{",
"cookieValues",
"=",
"l",
".",
"toArray",
"(",
"new",
"String",
"[",
"l",
".",
"size",
"(",
")",
"]",
")",
";",
"}",
"}",
"String",
"endpointAddress",
"=",
"(",
"String",
")",
"msgContext",
".",
"get",
"(",
"BindingProvider",
".",
"ENDPOINT_ADDRESS_PROPERTY",
")",
";",
"if",
"(",
"cookieValues",
"!=",
"null",
")",
"{",
"if",
"(",
"endpointAddress",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"\"",
")",
";",
"}",
"URL",
"hostURL",
";",
"try",
"{",
"hostURL",
"=",
"new",
"URL",
"(",
"endpointAddress",
")",
";",
"}",
"catch",
"(",
"MalformedURLException",
"e",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"endpointAddress",
"+",
"\"\"",
")",
";",
"}",
"final",
"Cookie",
"[",
"]",
"cookies",
"=",
"CookieUtil",
".",
"extractCookiesFrom",
"(",
"hostURL",
",",
"cookieValues",
")",
";",
"CurrentInfo",
"info",
"=",
"getCurrentInfo",
"(",
"true",
")",
";",
"ProducerSessionInformation",
"sessionInfo",
"=",
"info",
".",
"sessionInfo",
";",
"if",
"(",
"sessionInfo",
".",
"isPerGroupCookies",
"(",
")",
")",
"{",
"if",
"(",
"info",
".",
"groupId",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"\"",
")",
";",
"}",
"sessionInfo",
".",
"setGroupCookieFor",
"(",
"info",
".",
"groupId",
",",
"cookies",
")",
";",
"}",
"else",
"{",
"sessionInfo",
".",
"setUserCookie",
"(",
"cookies",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"public",
"static",
"void",
"setCurrentInfo",
"(",
"String",
"groupId",
",",
"ProducerSessionInformation",
"sessionInformation",
")",
"{",
"local",
".",
"set",
"(",
"new",
"CurrentInfo",
"(",
"groupId",
",",
"sessionInformation",
")",
")",
";",
"}",
"public",
"static",
"void",
"resetCurrentInfo",
"(",
")",
"{",
"local",
".",
"set",
"(",
"null",
")",
";",
"}",
"public",
"static",
"ProducerSessionInformation",
"getCurrentProducerSessionInformation",
"(",
")",
"{",
"CurrentInfo",
"info",
"=",
"getCurrentInfo",
"(",
"false",
")",
";",
"if",
"(",
"info",
"!=",
"null",
")",
"{",
"return",
"info",
".",
"sessionInfo",
";",
"}",
"return",
"null",
";",
"}",
"public",
"static",
"String",
"getCurrentGroupId",
"(",
")",
"{",
"CurrentInfo",
"info",
"=",
"getCurrentInfo",
"(",
"false",
")",
";",
"if",
"(",
"info",
"!=",
"null",
")",
"{",
"return",
"info",
".",
"groupId",
";",
"}",
"return",
"null",
";",
"}",
"public",
"static",
"void",
"setCurrentGroupId",
"(",
"String",
"groupId",
")",
"{",
"CurrentInfo",
"currentInfo",
"=",
"local",
".",
"get",
"(",
")",
";",
"if",
"(",
"currentInfo",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"\"",
")",
";",
"}",
"currentInfo",
".",
"groupId",
"=",
"groupId",
";",
"}",
"private",
"static",
"CurrentInfo",
"getCurrentInfo",
"(",
"boolean",
"createIfNeeded",
")",
"{",
"CurrentInfo",
"info",
"=",
"local",
".",
"get",
"(",
")",
";",
"if",
"(",
"info",
"==",
"null",
"&&",
"createIfNeeded",
")",
"{",
"info",
"=",
"new",
"CurrentInfo",
"(",
"null",
",",
"new",
"ProducerSessionInformation",
"(",
")",
")",
";",
"local",
".",
"set",
"(",
"info",
")",
";",
"}",
"return",
"info",
";",
"}",
"static",
"class",
"CurrentInfo",
"{",
"public",
"CurrentInfo",
"(",
"String",
"groupId",
",",
"ProducerSessionInformation",
"sessionInfo",
")",
"{",
"this",
".",
"groupId",
"=",
"groupId",
";",
"this",
".",
"sessionInfo",
"=",
"sessionInfo",
";",
"}",
"String",
"groupId",
";",
"ProducerSessionInformation",
"sessionInfo",
";",
"}",
"}",
"</s>"
] |
12,303 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"handler",
";",
"import",
"org",
".",
"apache",
".",
"commons",
".",
"httpclient",
".",
"Cookie",
";",
"import",
"org",
".",
"apache",
".",
"commons",
".",
"httpclient",
".",
"cookie",
".",
"MalformedCookieException",
";",
"import",
"org",
".",
"apache",
".",
"commons",
".",
"httpclient",
".",
"cookie",
".",
"RFC2109Spec",
";",
"import",
"org",
".",
"slf4j",
".",
"Logger",
";",
"import",
"org",
".",
"slf4j",
".",
"LoggerFactory",
";",
"import",
"java",
".",
"net",
".",
"URL",
";",
"import",
"java",
".",
"util",
".",
"Date",
";",
"public",
"class",
"CookieUtil",
"{",
"private",
"static",
"final",
"RFC2109Spec",
"cookieParser",
"=",
"new",
"RFC2109Spec",
"(",
")",
";",
"private",
"static",
"final",
"Logger",
"log",
"=",
"LoggerFactory",
".",
"getLogger",
"(",
"CookieUtil",
".",
"class",
")",
";",
"public",
"static",
"final",
"String",
"SET_COOKIE",
"=",
"\"Set-Cookie\"",
";",
"public",
"static",
"final",
"String",
"COOKIE",
"=",
"\"Cookie\"",
";",
"public",
"static",
"Cookie",
"[",
"]",
"extractCookiesFrom",
"(",
"URL",
"remoteAddress",
",",
"String",
"[",
"]",
"cookieValues",
")",
"{",
"return",
"extractCookies",
"(",
"remoteAddress",
",",
"coalesceCookies",
"(",
"cookieValues",
")",
")",
";",
"}",
"private",
"static",
"String",
"coalesceCookies",
"(",
"String",
"[",
"]",
"cookieValues",
")",
"{",
"assert",
"cookieValues",
"!=",
"null",
";",
"StringBuffer",
"logBuffer",
"=",
"null",
";",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"logBuffer",
"=",
"new",
"StringBuffer",
"(",
"128",
")",
";",
"logBuffer",
".",
"append",
"(",
"\"\"",
")",
";",
"}",
"int",
"cookieNumber",
"=",
"cookieValues",
".",
"length",
";",
"StringBuffer",
"cookieBuffer",
"=",
"new",
"StringBuffer",
"(",
"cookieNumber",
"*",
"128",
")",
";",
"String",
"cookieValue",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"cookieNumber",
";",
"i",
"++",
")",
"{",
"cookieValue",
"=",
"cookieValues",
"[",
"i",
"]",
";",
"cookieBuffer",
".",
"append",
"(",
"cookieValue",
")",
";",
"if",
"(",
"i",
"<",
"cookieNumber",
"-",
"1",
")",
"{",
"cookieBuffer",
".",
"append",
"(",
"','",
")",
";",
"}",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"logBuffer",
".",
"append",
"(",
"\"t\"",
")",
".",
"append",
"(",
"i",
")",
".",
"append",
"(",
"\":t\"",
")",
".",
"append",
"(",
"cookieValue",
")",
".",
"append",
"(",
"\"n\"",
")",
";",
"}",
"}",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"log",
".",
"debug",
"(",
"logBuffer",
".",
"toString",
"(",
")",
")",
";",
"}",
"return",
"cookieBuffer",
".",
"toString",
"(",
")",
";",
"}",
"private",
"static",
"Cookie",
"[",
"]",
"extractCookies",
"(",
"URL",
"hostURL",
",",
"String",
"cookieValue",
")",
"{",
"Cookie",
"[",
"]",
"cookies",
";",
"try",
"{",
"String",
"host",
"=",
"hostURL",
".",
"getHost",
"(",
")",
";",
"int",
"port",
"=",
"hostURL",
".",
"getPort",
"(",
")",
";",
"if",
"(",
"port",
"==",
"-",
"1",
")",
"{",
"port",
"=",
"80",
";",
"}",
"String",
"path",
"=",
"hostURL",
".",
"getPath",
"(",
")",
";",
"boolean",
"secure",
"=",
"hostURL",
".",
"getProtocol",
"(",
")",
".",
"endsWith",
"(",
"\"s\"",
")",
";",
"cookies",
"=",
"cookieParser",
".",
"parse",
"(",
"host",
",",
"port",
",",
"path",
",",
"secure",
",",
"cookieValue",
")",
";",
"for",
"(",
"Cookie",
"cookie",
":",
"cookies",
")",
"{",
"cookieParser",
".",
"validate",
"(",
"host",
",",
"port",
",",
"path",
",",
"secure",
",",
"cookie",
")",
";",
"}",
"}",
"catch",
"(",
"MalformedCookieException",
"e",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"cookieValue",
")",
";",
"}",
"return",
"cookies",
";",
"}",
"public",
"static",
"javax",
".",
"servlet",
".",
"http",
".",
"Cookie",
"convertFrom",
"(",
"Cookie",
"cookie",
")",
"{",
"if",
"(",
"cookie",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"javax",
".",
"servlet",
".",
"http",
".",
"Cookie",
"result",
"=",
"new",
"javax",
".",
"servlet",
".",
"http",
".",
"Cookie",
"(",
"cookie",
".",
"getName",
"(",
")",
",",
"cookie",
".",
"getValue",
"(",
")",
")",
";",
"result",
".",
"setComment",
"(",
"cookie",
".",
"getComment",
"(",
")",
")",
";",
"result",
".",
"setDomain",
"(",
"cookie",
".",
"getDomain",
"(",
")",
")",
";",
"Date",
"expiryDate",
"=",
"cookie",
".",
"getExpiryDate",
"(",
")",
";",
"int",
"maxAge",
";",
"if",
"(",
"expiryDate",
"!=",
"null",
")",
"{",
"long",
"maxAgeLong",
"=",
"expiryDate",
".",
"getTime",
"(",
")",
"-",
"new",
"Date",
"(",
")",
".",
"getTime",
"(",
")",
";",
"if",
"(",
"maxAgeLong",
">=",
"Integer",
".",
"MAX_VALUE",
")",
"{",
"maxAge",
"=",
"Integer",
".",
"MAX_VALUE",
";",
"}",
"else",
"{",
"maxAge",
"=",
"(",
"int",
")",
"maxAgeLong",
";",
"}",
"}",
"else",
"{",
"maxAge",
"=",
"-",
"1",
";",
"}",
"result",
".",
"setMaxAge",
"(",
"maxAge",
")",
";",
"result",
".",
"setPath",
"(",
"cookie",
".",
"getPath",
"(",
")",
")",
";",
"result",
".",
"setSecure",
"(",
"cookie",
".",
"getSecure",
"(",
")",
")",
";",
"result",
".",
"setVersion",
"(",
"cookie",
".",
"getVersion",
"(",
")",
")",
";",
"return",
"result",
";",
"}",
"}",
"</s>"
] |
12,304 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletInvoker",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletInvokerException",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"PortletInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"api",
".",
"session",
".",
"SessionEventListener",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"ProducerInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"RefreshResult",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"handlers",
".",
"ProducerSessionInformation",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"migration",
".",
"ExportInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"migration",
".",
"ImportInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"migration",
".",
"MigrationService",
";",
"import",
"javax",
".",
"servlet",
".",
"http",
".",
"HttpSession",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"interface",
"WSRPConsumer",
"extends",
"PortletInvoker",
",",
"SessionEventListener",
"{",
"String",
"getProducerId",
"(",
")",
";",
"ProducerSessionInformation",
"getProducerSessionInformationFrom",
"(",
"PortletInvocation",
"invocation",
")",
";",
"ProducerSessionInformation",
"getProducerSessionInformationFrom",
"(",
"HttpSession",
"session",
")",
";",
"ProducerInfo",
"getProducerInfo",
"(",
")",
";",
"void",
"refreshProducerInfo",
"(",
")",
"throws",
"PortletInvokerException",
";",
"void",
"releaseSessions",
"(",
")",
"throws",
"PortletInvokerException",
";",
"void",
"activate",
"(",
")",
"throws",
"Exception",
";",
"void",
"deactivate",
"(",
")",
"throws",
"Exception",
";",
"boolean",
"isRefreshNeeded",
"(",
")",
";",
"RefreshResult",
"refresh",
"(",
"boolean",
"forceRefresh",
")",
"throws",
"PortletInvokerException",
";",
"void",
"start",
"(",
")",
"throws",
"Exception",
";",
"void",
"stop",
"(",
")",
"throws",
"Exception",
";",
"ExportInfo",
"exportPortlets",
"(",
"List",
"<",
"String",
">",
"portletHandles",
")",
"throws",
"PortletInvokerException",
";",
"void",
"releaseExport",
"(",
"ExportInfo",
"exportInfo",
")",
"throws",
"PortletInvokerException",
";",
"MigrationService",
"getMigrationService",
"(",
")",
";",
"boolean",
"isImportExportSupported",
"(",
")",
";",
"ImportInfo",
"importPortlets",
"(",
"ExportInfo",
"exportInfo",
",",
"List",
"<",
"String",
">",
"portlets",
")",
"throws",
"PortletInvokerException",
";",
"boolean",
"isUsingWSRP2",
"(",
")",
";",
"}",
"</s>"
] |
12,305 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"handler",
";",
"import",
"junit",
".",
"framework",
".",
"TestCase",
";",
"import",
"org",
".",
"apache",
".",
"commons",
".",
"httpclient",
".",
"Cookie",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"handlers",
".",
"ProducerSessionInformation",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"handler",
".",
"MockSOAPMessage",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"handler",
".",
"MockSOAPMessageContext",
";",
"import",
"javax",
".",
"xml",
".",
"soap",
".",
"MimeHeaders",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"handler",
".",
"MessageContext",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"handler",
".",
"soap",
".",
"SOAPMessageContext",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"public",
"class",
"RequestHeaderClientHandlerTestCase",
"extends",
"TestCase",
"{",
"RequestHeaderClientHandler",
"handler",
";",
"protected",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"handler",
"=",
"new",
"RequestHeaderClientHandler",
"(",
")",
";",
"RequestHeaderClientHandler",
".",
"resetCurrentInfo",
"(",
")",
";",
"}",
"public",
"void",
"testSimpleCookieHandleRequest",
"(",
")",
"{",
"MockSOAPMessage",
"message",
"=",
"new",
"MockSOAPMessage",
"(",
")",
";",
"SOAPMessageContext",
"msgContext",
"=",
"MockSOAPMessageContext",
".",
"createMessageContext",
"(",
"message",
",",
"getClass",
"(",
")",
".",
"getClassLoader",
"(",
")",
")",
";",
"handler",
".",
"handleRequest",
"(",
"msgContext",
")",
";",
"checkCookies",
"(",
"msgContext",
",",
"0",
",",
"(",
"String",
"[",
"]",
")",
"null",
")",
";",
"ProducerSessionInformation",
"sessionInformation",
"=",
"new",
"ProducerSessionInformation",
"(",
")",
";",
"sessionInformation",
".",
"setUserCookie",
"(",
"new",
"Cookie",
"[",
"]",
"{",
"createCookie",
"(",
"\"name\"",
",",
"\"value\"",
",",
"1",
")",
"}",
")",
";",
"RequestHeaderClientHandler",
".",
"setCurrentInfo",
"(",
"null",
",",
"sessionInformation",
")",
";",
"handler",
".",
"handleRequest",
"(",
"msgContext",
")",
";",
"checkCookies",
"(",
"msgContext",
",",
"1",
",",
"\"name=value\"",
")",
";",
"}",
"public",
"void",
"testGroupCookieHandleRequest",
"(",
")",
"{",
"MockSOAPMessage",
"message",
"=",
"new",
"MockSOAPMessage",
"(",
")",
";",
"SOAPMessageContext",
"msgContext",
"=",
"MockSOAPMessageContext",
".",
"createMessageContext",
"(",
"message",
",",
"getClass",
"(",
")",
".",
"getClassLoader",
"(",
")",
")",
";",
"ProducerSessionInformation",
"info",
"=",
"new",
"ProducerSessionInformation",
"(",
")",
";",
"info",
".",
"setPerGroupCookies",
"(",
"true",
")",
";",
"String",
"groupId",
"=",
"\"group\"",
";",
"info",
".",
"setGroupCookieFor",
"(",
"groupId",
",",
"new",
"Cookie",
"[",
"]",
"{",
"createCookie",
"(",
"\"name\"",
",",
"\"value\"",
",",
"1",
")",
"}",
")",
";",
"RequestHeaderClientHandler",
".",
"setCurrentInfo",
"(",
"null",
",",
"info",
")",
";",
"try",
"{",
"handler",
".",
"handleRequest",
"(",
"msgContext",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalStateException",
"e",
")",
"{",
"}",
"RequestHeaderClientHandler",
".",
"setCurrentGroupId",
"(",
"groupId",
")",
";",
"handler",
".",
"handleRequest",
"(",
"msgContext",
")",
";",
"checkCookies",
"(",
"msgContext",
",",
"1",
",",
"\"name=value\"",
")",
";",
"}",
"public",
"void",
"testBothCookiesHandleRequest",
"(",
")",
"{",
"MockSOAPMessage",
"message",
"=",
"new",
"MockSOAPMessage",
"(",
")",
";",
"SOAPMessageContext",
"msgContext",
"=",
"MockSOAPMessageContext",
".",
"createMessageContext",
"(",
"message",
",",
"getClass",
"(",
")",
".",
"getClassLoader",
"(",
")",
")",
";",
"ProducerSessionInformation",
"info",
"=",
"new",
"ProducerSessionInformation",
"(",
")",
";",
"info",
".",
"setPerGroupCookies",
"(",
"true",
")",
";",
"String",
"groupId",
"=",
"\"group\"",
";",
"info",
".",
"setGroupCookieFor",
"(",
"groupId",
",",
"new",
"Cookie",
"[",
"]",
"{",
"createCookie",
"(",
"\"name\"",
",",
"\"value\"",
",",
"1",
")",
"}",
")",
";",
"info",
".",
"setUserCookie",
"(",
"new",
"Cookie",
"[",
"]",
"{",
"createCookie",
"(",
"\"usercookie\"",
",",
"\"uservalue\"",
",",
"1",
")",
"}",
")",
";",
"RequestHeaderClientHandler",
".",
"setCurrentInfo",
"(",
"groupId",
",",
"info",
")",
";",
"handler",
".",
"handleRequest",
"(",
"msgContext",
")",
";",
"checkCookies",
"(",
"msgContext",
",",
"1",
",",
"\"\"",
")",
";",
"}",
"public",
"void",
"testCookieWithoutInitHandleResponse",
"(",
")",
"{",
"MockSOAPMessage",
"message",
"=",
"new",
"MockSOAPMessage",
"(",
")",
";",
"SOAPMessageContext",
"msgContext",
"=",
"MockSOAPMessageContext",
".",
"createMessageContext",
"(",
"message",
",",
"getClass",
"(",
")",
".",
"getClassLoader",
"(",
")",
")",
";",
"setCookies",
"(",
"msgContext",
",",
"\"name=value\"",
")",
";",
"handler",
".",
"handleResponse",
"(",
"msgContext",
")",
";",
"ProducerSessionInformation",
"info",
"=",
"RequestHeaderClientHandler",
".",
"getCurrentProducerSessionInformation",
"(",
")",
";",
"assertEquals",
"(",
"\"name=value\"",
",",
"info",
".",
"getUserCookie",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isInitCookieDone",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isPerGroupCookies",
"(",
")",
")",
";",
"}",
"public",
"void",
"testMultipleCookiesInResponse",
"(",
")",
"{",
"MockSOAPMessage",
"message",
"=",
"new",
"MockSOAPMessage",
"(",
")",
";",
"SOAPMessageContext",
"msgContext",
"=",
"MockSOAPMessageContext",
".",
"createMessageContext",
"(",
"message",
",",
"getClass",
"(",
")",
".",
"getClassLoader",
"(",
")",
")",
";",
"setCookies",
"(",
"msgContext",
",",
"\"name1=value1\"",
",",
"\"name2=value2\"",
",",
"\"name3=value3\"",
")",
";",
"handler",
".",
"handleResponse",
"(",
"msgContext",
")",
";",
"ProducerSessionInformation",
"info",
"=",
"RequestHeaderClientHandler",
".",
"getCurrentProducerSessionInformation",
"(",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"info",
".",
"getUserCookie",
"(",
")",
")",
";",
"}",
"public",
"void",
"testCurrentInfo",
"(",
")",
"{",
"assertNull",
"(",
"RequestHeaderClientHandler",
".",
"getCurrentProducerSessionInformation",
"(",
")",
")",
";",
"assertNull",
"(",
"RequestHeaderClientHandler",
".",
"getCurrentGroupId",
"(",
")",
")",
";",
"try",
"{",
"RequestHeaderClientHandler",
".",
"setCurrentGroupId",
"(",
"\"foo\"",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalStateException",
"e",
")",
"{",
"}",
"ProducerSessionInformation",
"info",
"=",
"new",
"ProducerSessionInformation",
"(",
")",
";",
"String",
"groupId",
"=",
"\"group\"",
";",
"RequestHeaderClientHandler",
".",
"setCurrentInfo",
"(",
"groupId",
",",
"info",
")",
";",
"assertSame",
"(",
"info",
",",
"RequestHeaderClientHandler",
".",
"getCurrentProducerSessionInformation",
"(",
")",
")",
";",
"assertEquals",
"(",
"groupId",
",",
"RequestHeaderClientHandler",
".",
"getCurrentGroupId",
"(",
")",
")",
";",
"}",
"private",
"void",
"setCookies",
"(",
"SOAPMessageContext",
"context",
",",
"String",
"...",
"values",
")",
"{",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"httpHeaders",
"=",
"new",
"HashMap",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"(",
")",
";",
"final",
"List",
"<",
"String",
">",
"cookies",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
"values",
".",
"length",
")",
";",
"for",
"(",
"String",
"value",
":",
"values",
")",
"{",
"context",
".",
"getMessage",
"(",
")",
".",
"getMimeHeaders",
"(",
")",
".",
"addHeader",
"(",
"CookieUtil",
".",
"SET_COOKIE",
",",
"value",
")",
";",
"cookies",
".",
"add",
"(",
"value",
")",
";",
"}",
"httpHeaders",
".",
"put",
"(",
"CookieUtil",
".",
"COOKIE",
",",
"cookies",
")",
";",
"context",
".",
"put",
"(",
"MessageContext",
".",
"HTTP_REQUEST_HEADERS",
",",
"httpHeaders",
")",
";",
"}",
"private",
"void",
"checkCookies",
"(",
"SOAPMessageContext",
"messageContext",
",",
"int",
"number",
",",
"String",
"...",
"values",
")",
"{",
"final",
"MimeHeaders",
"mimeHeaders",
"=",
"messageContext",
".",
"getMessage",
"(",
")",
".",
"getMimeHeaders",
"(",
")",
";",
"final",
"String",
"[",
"]",
"cookies",
"=",
"mimeHeaders",
".",
"getHeader",
"(",
"CookieUtil",
".",
"COOKIE",
")",
";",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"httpHeaders",
"=",
"(",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
")",
"messageContext",
".",
"get",
"(",
"MessageContext",
".",
"HTTP_REQUEST_HEADERS",
")",
";",
"List",
"<",
"String",
">",
"cookiesList",
"=",
"httpHeaders",
".",
"get",
"(",
"CookieUtil",
".",
"COOKIE",
")",
";",
"if",
"(",
"number",
"==",
"0",
")",
"{",
"assertNull",
"(",
"cookies",
")",
";",
"assertNull",
"(",
"cookiesList",
")",
";",
"}",
"else",
"{",
"assertEquals",
"(",
"number",
",",
"cookies",
".",
"length",
")",
";",
"assertEquals",
"(",
"number",
",",
"cookiesList",
".",
"size",
"(",
")",
")",
";",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"String",
"value",
":",
"values",
")",
"{",
"assertEquals",
"(",
"value",
",",
"cookies",
"[",
"i",
"]",
")",
";",
"assertEquals",
"(",
"value",
",",
"cookiesList",
".",
"get",
"(",
"i",
")",
")",
";",
"i",
"++",
";",
"}",
"}",
"}",
"private",
"Cookie",
"createCookie",
"(",
"String",
"name",
",",
"String",
"value",
",",
"int",
"secondsBeforeExpiration",
")",
"{",
"return",
"new",
"Cookie",
"(",
"\"domain\"",
",",
"name",
",",
"value",
",",
"\"path\"",
",",
"secondsBeforeExpiration",
",",
"false",
")",
";",
"}",
"}",
"</s>"
] |
12,306 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"util",
".",
"ParameterValidation",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"federation",
".",
"FederatingPortletInvoker",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPConsumer",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"api",
".",
"session",
".",
"SessionEventBroadcaster",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"ConsumerException",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"EndpointConfigurationInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"ProducerInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"handlers",
".",
"session",
".",
"InMemorySessionRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"handlers",
".",
"session",
".",
"SessionRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"migration",
".",
"InMemoryMigrationService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"migration",
".",
"MigrationService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"spi",
".",
"ConsumerRegistrySPI",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Collection",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"Iterator",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"public",
"class",
"MockConsumerRegistry",
"implements",
"ConsumerRegistrySPI",
"{",
"private",
"Map",
"<",
"String",
",",
"WSRPConsumer",
">",
"consumers",
"=",
"new",
"HashMap",
"(",
"3",
")",
";",
"public",
"static",
"final",
"String",
"MOCK_SERVICE_DESCRIPTION",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"MOCK_MARKUP",
"=",
"\"mock-markup\"",
";",
"public",
"static",
"final",
"String",
"CONSUMER1",
"=",
"\"inDB\"",
";",
"public",
"static",
"final",
"String",
"CONSUMER2",
"=",
"\"inDB2\"",
";",
"private",
"InMemorySessionRegistry",
"sessionRegistry",
"=",
"new",
"InMemorySessionRegistry",
"(",
")",
";",
"private",
"InMemoryMigrationService",
"migrationService",
"=",
"new",
"InMemoryMigrationService",
"(",
")",
";",
"public",
"MockConsumerRegistry",
"(",
")",
"{",
"reloadConsumers",
"(",
")",
";",
"}",
"public",
"List",
"<",
"WSRPConsumer",
">",
"getConfiguredConsumers",
"(",
")",
"{",
"return",
"new",
"ArrayList",
"<",
"WSRPConsumer",
">",
"(",
"consumers",
".",
"values",
"(",
")",
")",
";",
"}",
"public",
"WSRPConsumer",
"getConsumer",
"(",
"String",
"id",
")",
"{",
"return",
"consumers",
".",
"get",
"(",
"id",
")",
";",
"}",
"public",
"FederatingPortletInvoker",
"getFederatingPortletInvoker",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"WSRPConsumer",
"createConsumer",
"(",
"String",
"id",
",",
"Integer",
"expirationCacheSeconds",
",",
"String",
"wsdlURL",
")",
"{",
"MockWSRPConsumer",
"consumer",
"=",
"new",
"MockWSRPConsumer",
"(",
"id",
")",
";",
"ProducerInfo",
"producerInfo",
"=",
"consumer",
".",
"getProducerInfo",
"(",
")",
";",
"producerInfo",
".",
"setExpirationCacheSeconds",
"(",
"expirationCacheSeconds",
")",
";",
"producerInfo",
".",
"getEndpointConfigurationInfo",
"(",
")",
".",
"setWsdlDefinitionURL",
"(",
"wsdlURL",
")",
";",
"consumers",
".",
"put",
"(",
"id",
",",
"consumer",
")",
";",
"return",
"consumer",
";",
"}",
"public",
"void",
"persistConsumer",
"(",
"WSRPConsumer",
"consumer",
")",
"{",
"ParameterValidation",
".",
"throwIllegalArgExceptionIfNull",
"(",
"consumer",
",",
"\"WSRPConsumer\"",
")",
";",
"consumers",
".",
"put",
"(",
"consumer",
".",
"getProducerId",
"(",
")",
",",
"consumer",
")",
";",
"}",
"public",
"void",
"activateConsumerWith",
"(",
"String",
"id",
")",
"throws",
"ConsumerException",
"{",
"}",
"public",
"String",
"updateProducerInfo",
"(",
"ProducerInfo",
"producerInfo",
")",
"{",
"return",
"null",
";",
"}",
"public",
"void",
"deactivateConsumerWith",
"(",
"String",
"id",
")",
"throws",
"ConsumerException",
"{",
"}",
"public",
"void",
"registerOrDeregisterConsumerWith",
"(",
"String",
"id",
",",
"boolean",
"register",
")",
"{",
"}",
"public",
"void",
"destroyConsumer",
"(",
"String",
"id",
")",
"{",
"}",
"public",
"void",
"reloadConsumers",
"(",
")",
"{",
"consumers",
".",
"clear",
"(",
")",
";",
"consumers",
".",
"put",
"(",
"CONSUMER1",
",",
"new",
"MockWSRPConsumer",
"(",
"CONSUMER1",
")",
")",
";",
"MockWSRPConsumer",
"consumer",
"=",
"new",
"MockWSRPConsumer",
"(",
"CONSUMER2",
")",
";",
"consumer",
".",
"getProducerInfo",
"(",
")",
".",
"setActive",
"(",
"true",
")",
";",
"EndpointConfigurationInfo",
"info",
"=",
"consumer",
".",
"getProducerInfo",
"(",
")",
".",
"getEndpointConfigurationInfo",
"(",
")",
";",
"consumers",
".",
"put",
"(",
"CONSUMER2",
",",
"consumer",
")",
";",
"}",
"public",
"void",
"start",
"(",
")",
"throws",
"Exception",
"{",
"reloadConsumers",
"(",
")",
";",
"}",
"public",
"void",
"stop",
"(",
")",
"throws",
"Exception",
"{",
"}",
"public",
"void",
"save",
"(",
"ProducerInfo",
"info",
",",
"String",
"messageOnError",
")",
"throws",
"ConsumerException",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}",
"public",
"void",
"delete",
"(",
"ProducerInfo",
"info",
")",
"throws",
"ConsumerException",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}",
"public",
"String",
"update",
"(",
"ProducerInfo",
"producerInfo",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}",
"public",
"Iterator",
"<",
"ProducerInfo",
">",
"getProducerInfosFromStorage",
"(",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}",
"public",
"ProducerInfo",
"loadProducerInfo",
"(",
"String",
"id",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}",
"public",
"void",
"setFederatingPortletInvoker",
"(",
"FederatingPortletInvoker",
"federatingPortletInvoker",
")",
"{",
"}",
"public",
"void",
"setSessionEventBroadcaster",
"(",
"SessionEventBroadcaster",
"sessionEventBroadcaster",
")",
"{",
"}",
"public",
"ProducerInfo",
"getProducerInfoByKey",
"(",
"String",
"key",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}",
"public",
"MigrationService",
"getMigrationService",
"(",
")",
"{",
"return",
"migrationService",
";",
"}",
"public",
"void",
"setMigrationService",
"(",
"MigrationService",
"migrationService",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}",
"public",
"SessionRegistry",
"getSessionRegistry",
"(",
")",
"{",
"return",
"sessionRegistry",
";",
"}",
"public",
"void",
"setSessionRegistry",
"(",
"SessionRegistry",
"sessionRegistry",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}",
"public",
"boolean",
"containsConsumer",
"(",
"String",
"id",
")",
"{",
"return",
"consumers",
".",
"containsKey",
"(",
"id",
")",
";",
"}",
"public",
"Collection",
"<",
"String",
">",
"getConfiguredConsumersIds",
"(",
")",
"{",
"return",
"consumers",
".",
"keySet",
"(",
")",
";",
"}",
"public",
"int",
"getConfiguredConsumerNumber",
"(",
")",
"{",
"return",
"consumers",
".",
"size",
"(",
")",
";",
"}",
"public",
"WSRPConsumer",
"createConsumerFrom",
"(",
"ProducerInfo",
"producerInfo",
",",
"boolean",
"putInCache",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}",
"public",
"void",
"registerWithFederatingPortletInvoker",
"(",
"WSRPConsumer",
"consumer",
")",
"{",
"consumers",
".",
"put",
"(",
"consumer",
".",
"getProducerId",
"(",
")",
",",
"consumer",
")",
";",
"}",
"public",
"void",
"deregisterWithFederatingPortletInvoker",
"(",
"WSRPConsumer",
"consumer",
")",
"{",
"consumers",
".",
"remove",
"(",
"consumer",
".",
"getProducerId",
"(",
")",
")",
";",
"}",
"public",
"long",
"getPersistedLastModifiedForProducerInfoWith",
"(",
"String",
"id",
")",
"{",
"return",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"}",
"}",
"</s>"
] |
12,307 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"NotYetImplemented",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Portlet",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletInvokerException",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletStateType",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletStatus",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"PortletInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"response",
".",
"PortletInvocationResponse",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"state",
".",
"DestroyCloneFailure",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"state",
".",
"PropertyChange",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"state",
".",
"PropertyMap",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"api",
".",
"session",
".",
"SessionEvent",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"ProducerInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"RefreshResult",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"handlers",
".",
"ProducerSessionInformation",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"handlers",
".",
"SessionHandler",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"handlers",
".",
"session",
".",
"SessionRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"migration",
".",
"ExportInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"migration",
".",
"ImportInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"migration",
".",
"MigrationService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"portlet",
".",
"info",
".",
"WSRPPortletInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"spi",
".",
"WSRPConsumerSPI",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"MarkupService",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RuntimeContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"javax",
".",
"servlet",
".",
"http",
".",
"HttpSession",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"public",
"class",
"MockWSRPConsumer",
"implements",
"WSRPConsumerSPI",
"{",
"private",
"ProducerInfo",
"producerInfo",
";",
"private",
"boolean",
"useWSRP2",
"=",
"true",
";",
"public",
"MockWSRPConsumer",
"(",
"String",
"id",
")",
"{",
"producerInfo",
"=",
"new",
"ProducerInfo",
"(",
"null",
")",
";",
"producerInfo",
".",
"setId",
"(",
"id",
")",
";",
"producerInfo",
".",
"setEndpointConfigurationInfo",
"(",
"new",
"MockEndpointConfigurationInfo",
"(",
")",
")",
";",
"}",
"public",
"String",
"getProducerId",
"(",
")",
"{",
"return",
"producerInfo",
".",
"getId",
"(",
")",
";",
"}",
"public",
"ProducerSessionInformation",
"getProducerSessionInformationFrom",
"(",
"PortletInvocation",
"invocation",
")",
"{",
"return",
"null",
";",
"}",
"public",
"ProducerSessionInformation",
"getProducerSessionInformationFrom",
"(",
"HttpSession",
"session",
")",
"{",
"return",
"null",
";",
"}",
"public",
"ProducerInfo",
"getProducerInfo",
"(",
")",
"{",
"return",
"producerInfo",
";",
"}",
"public",
"MarkupService",
"getMarkupService",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"boolean",
"supportsUserScope",
"(",
"String",
"userScope",
")",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"WSRPPortletInfo",
"getPortletInfo",
"(",
"PortletInvocation",
"invocation",
")",
"throws",
"PortletInvokerException",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"SessionRegistry",
"getSessionRegistry",
"(",
")",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"setSessionRegistry",
"(",
"SessionRegistry",
"sessionInfos",
")",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"RegistrationContext",
"getRegistrationContext",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"UserContext",
"getUserContextFrom",
"(",
"WSRPPortletInfo",
"info",
",",
"PortletInvocation",
"invocation",
",",
"RuntimeContext",
"runtimeContext",
")",
"throws",
"PortletInvokerException",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"SessionHandler",
"getSessionHandler",
"(",
")",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"setTemplatesIfNeeded",
"(",
"WSRPPortletInfo",
"info",
",",
"PortletInvocation",
"invocation",
",",
"RuntimeContext",
"runtimeContext",
")",
"throws",
"PortletInvokerException",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"refreshProducerInfo",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"handleInvalidRegistrationFault",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"releaseSessions",
"(",
")",
"{",
"}",
"public",
"void",
"activate",
"(",
")",
"throws",
"Exception",
"{",
"}",
"public",
"void",
"deactivate",
"(",
")",
"throws",
"Exception",
"{",
"}",
"public",
"boolean",
"isActive",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"isRefreshNeeded",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"RefreshResult",
"refresh",
"(",
"boolean",
"forceRefresh",
")",
"{",
"return",
"null",
";",
"}",
"public",
"Set",
"<",
"Portlet",
">",
"getPortlets",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"return",
"null",
";",
"}",
"public",
"Portlet",
"getPortlet",
"(",
"PortletContext",
"portletContext",
")",
"throws",
"IllegalArgumentException",
",",
"PortletInvokerException",
"{",
"return",
"null",
";",
"}",
"public",
"PortletStatus",
"getStatus",
"(",
"PortletContext",
"portletContext",
")",
"throws",
"IllegalArgumentException",
",",
"PortletInvokerException",
"{",
"return",
"null",
";",
"}",
"public",
"PortletInvocationResponse",
"invoke",
"(",
"PortletInvocation",
"invocation",
")",
"throws",
"IllegalArgumentException",
",",
"PortletInvokerException",
"{",
"return",
"null",
";",
"}",
"public",
"PortletContext",
"createClone",
"(",
"PortletStateType",
"stateType",
",",
"PortletContext",
"portletContext",
")",
"throws",
"IllegalArgumentException",
",",
"PortletInvokerException",
",",
"UnsupportedOperationException",
"{",
"return",
"null",
";",
"}",
"public",
"List",
"<",
"DestroyCloneFailure",
">",
"destroyClones",
"(",
"List",
"<",
"PortletContext",
">",
"portletContexts",
")",
"throws",
"IllegalArgumentException",
",",
"PortletInvokerException",
",",
"UnsupportedOperationException",
"{",
"return",
"null",
";",
"}",
"public",
"PropertyMap",
"getProperties",
"(",
"PortletContext",
"portletContext",
",",
"Set",
"keys",
")",
"throws",
"IllegalArgumentException",
",",
"PortletInvokerException",
",",
"UnsupportedOperationException",
"{",
"return",
"null",
";",
"}",
"public",
"PropertyMap",
"getProperties",
"(",
"PortletContext",
"portletContext",
")",
"throws",
"IllegalArgumentException",
",",
"PortletInvokerException",
",",
"UnsupportedOperationException",
"{",
"return",
"null",
";",
"}",
"public",
"PortletContext",
"setProperties",
"(",
"PortletContext",
"portletContext",
",",
"PropertyChange",
"[",
"]",
"changes",
")",
"throws",
"IllegalArgumentException",
",",
"PortletInvokerException",
",",
"UnsupportedOperationException",
"{",
"return",
"null",
";",
"}",
"public",
"void",
"create",
"(",
")",
"throws",
"Exception",
"{",
"}",
"public",
"void",
"start",
"(",
")",
"throws",
"Exception",
"{",
"}",
"public",
"void",
"stop",
"(",
")",
"{",
"}",
"public",
"ExportInfo",
"exportPortlets",
"(",
"List",
"<",
"String",
">",
"portletHandles",
")",
"throws",
"PortletInvokerException",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"releaseExport",
"(",
"ExportInfo",
"exportInfo",
")",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"MigrationService",
"getMigrationService",
"(",
")",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"boolean",
"isImportExportSupported",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"ImportInfo",
"importPortlets",
"(",
"ExportInfo",
"exportInfo",
",",
"List",
"<",
"String",
">",
"portlets",
")",
"throws",
"PortletInvokerException",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"boolean",
"isUsingWSRP2",
"(",
")",
"{",
"return",
"useWSRP2",
";",
"}",
"public",
"void",
"setUsingWSRP2",
"(",
"boolean",
"useWSRP2",
")",
"{",
"this",
".",
"useWSRP2",
"=",
"useWSRP2",
";",
"}",
"public",
"void",
"destroy",
"(",
")",
"{",
"}",
"public",
"void",
"onSessionEvent",
"(",
"SessionEvent",
"event",
")",
"{",
"}",
"public",
"PortletContext",
"exportPortlet",
"(",
"PortletStateType",
"stateType",
",",
"PortletContext",
"originalPortletContext",
")",
"throws",
"PortletInvokerException",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"PortletContext",
"importPortlet",
"(",
"PortletStateType",
"stateType",
",",
"PortletContext",
"originalPortletContext",
")",
"throws",
"PortletInvokerException",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"}",
"</s>"
] |
12,308 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"EndpointConfigurationInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorBackedServiceFactory",
";",
"public",
"class",
"MockEndpointConfigurationInfo",
"extends",
"EndpointConfigurationInfo",
"{",
"public",
"MockEndpointConfigurationInfo",
"(",
")",
"{",
"super",
"(",
"new",
"BehaviorBackedServiceFactory",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
12,309 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"ResourceInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"spi",
".",
"PortletInvocationContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractPortalContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractSecurityContext",
";",
"public",
"class",
"TestResourceInvocation",
"extends",
"ResourceInvocation",
"{",
"public",
"TestResourceInvocation",
"(",
"PortletInvocationContext",
"ctx",
")",
"throws",
"IllegalArgumentException",
"{",
"super",
"(",
"ctx",
")",
";",
"setPortalContext",
"(",
"new",
"AbstractPortalContext",
"(",
")",
")",
";",
"setSecurityContext",
"(",
"new",
"AbstractSecurityContext",
"(",
"MockHttpServletRequest",
".",
"createMockRequest",
"(",
"null",
")",
")",
")",
";",
"setWindowContext",
"(",
"new",
"TestWindowContext",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
12,310 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"ActionInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"spi",
".",
"PortletInvocationContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractPortalContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractSecurityContext",
";",
"public",
"class",
"TestActionInvocation",
"extends",
"ActionInvocation",
"{",
"public",
"TestActionInvocation",
"(",
"PortletInvocationContext",
"ctx",
")",
"throws",
"IllegalArgumentException",
"{",
"super",
"(",
"ctx",
")",
";",
"setPortalContext",
"(",
"new",
"AbstractPortalContext",
"(",
")",
")",
";",
"setSecurityContext",
"(",
"new",
"AbstractSecurityContext",
"(",
"MockHttpServletRequest",
".",
"createMockRequest",
"(",
"null",
")",
")",
")",
";",
"setWindowContext",
"(",
"new",
"TestWindowContext",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
12,311 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"spi",
".",
"WindowContext",
";",
"public",
"class",
"TestWindowContext",
"implements",
"WindowContext",
"{",
"public",
"static",
"final",
"String",
"NAMESPACE",
"=",
"\"namespace\"",
";",
"private",
"static",
"final",
"String",
"ID",
"=",
"\"id\"",
";",
"public",
"String",
"getId",
"(",
")",
"{",
"return",
"ID",
";",
"}",
"public",
"String",
"getNamespace",
"(",
")",
"{",
"return",
"NAMESPACE",
";",
"}",
"}",
"</s>"
] |
12,312 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"net",
".",
"media",
".",
"MediaType",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"util",
".",
"MarkupInfo",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"ActionURL",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"ContainerURL",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"RenderURL",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"ResourceURL",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"StateString",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"URLFormat",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"spi",
".",
"PortletInvocationContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractPortletInvocationContext",
";",
"import",
"javax",
".",
"servlet",
".",
"http",
".",
"HttpServletRequest",
";",
"import",
"javax",
".",
"servlet",
".",
"http",
".",
"HttpServletResponse",
";",
"public",
"class",
"TestPortletInvocationContext",
"extends",
"AbstractPortletInvocationContext",
"implements",
"PortletInvocationContext",
"{",
"private",
"HttpServletRequest",
"mockRequest",
";",
"private",
"HttpServletResponse",
"mockResponse",
";",
"public",
"TestPortletInvocationContext",
"(",
")",
"{",
"super",
"(",
"MediaType",
".",
"TEXT_HTML",
")",
";",
"mockRequest",
"=",
"MockHttpServletRequest",
".",
"createMockRequest",
"(",
"null",
")",
";",
"mockResponse",
"=",
"MockHttpServletResponse",
".",
"createMockResponse",
"(",
")",
";",
"}",
"public",
"void",
"setMockRequest",
"(",
"HttpServletRequest",
"mockRequest",
")",
"{",
"this",
".",
"mockRequest",
"=",
"mockRequest",
";",
"}",
"public",
"void",
"setMockResponse",
"(",
"HttpServletResponse",
"mockResponse",
")",
"{",
"this",
".",
"mockResponse",
"=",
"mockResponse",
";",
"}",
"public",
"HttpServletRequest",
"getClientRequest",
"(",
")",
"{",
"if",
"(",
"mockRequest",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
")",
";",
"}",
"return",
"mockRequest",
";",
"}",
"public",
"HttpServletResponse",
"getClientResponse",
"(",
")",
"{",
"if",
"(",
"mockResponse",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
")",
";",
"}",
"return",
"mockResponse",
";",
"}",
"public",
"String",
"encodeResourceURL",
"(",
"String",
"url",
")",
"{",
"return",
"null",
";",
"}",
"public",
"String",
"renderURL",
"(",
"ContainerURL",
"containerURL",
",",
"URLFormat",
"urlFormat",
")",
"{",
"String",
"result",
";",
"if",
"(",
"containerURL",
"instanceof",
"ActionURL",
")",
"{",
"ActionURL",
"actionURL",
"=",
"(",
"ActionURL",
")",
"containerURL",
";",
"result",
"=",
"\"Action",
"is=\"",
"+",
"actionURL",
".",
"getInteractionState",
"(",
")",
".",
"getStringValue",
"(",
")",
";",
"}",
"else",
"if",
"(",
"containerURL",
"instanceof",
"RenderURL",
")",
"{",
"result",
"=",
"\"Render\"",
";",
"}",
"else",
"{",
"String",
"url",
"=",
"\"\"",
";",
"ResourceURL",
"resourceURL",
"=",
"(",
"(",
"ResourceURL",
")",
"containerURL",
")",
";",
"if",
"(",
"urlFormat",
".",
"getWantEscapeXML",
"(",
")",
")",
"{",
"url",
"+=",
"\"&\"",
";",
"}",
"else",
"{",
"url",
"+=",
"\"&\"",
";",
"}",
"url",
"+=",
"\"\"",
"+",
"resourceURL",
".",
"getResourceId",
"(",
")",
";",
"return",
"url",
";",
"}",
"StateString",
"ns",
"=",
"containerURL",
".",
"getNavigationalState",
"(",
")",
";",
"result",
"+=",
"\"",
"ns=\"",
"+",
"(",
"ns",
"!=",
"null",
"?",
"ns",
".",
"getStringValue",
"(",
")",
":",
"null",
")",
"+",
"\"",
"ws=\"",
"+",
"containerURL",
".",
"getWindowState",
"(",
")",
"+",
"\"",
"m=\"",
"+",
"containerURL",
".",
"getMode",
"(",
")",
";",
"return",
"result",
";",
"}",
"}",
"</s>"
] |
12,313 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
";",
"public",
"class",
"RequestedMarkupBehavior",
"{",
"private",
"static",
"ThreadLocal",
"<",
"String",
">",
"requestedMarkupBehavior",
"=",
"new",
"ThreadLocal",
"<",
"String",
">",
"(",
")",
";",
"public",
"static",
"String",
"getRequestedMarkupBehavior",
"(",
")",
"{",
"return",
"requestedMarkupBehavior",
".",
"get",
"(",
")",
";",
"}",
"public",
"static",
"void",
"setRequestedMarkupBehavior",
"(",
"String",
"requestedMarkupBehavior",
")",
"{",
"RequestedMarkupBehavior",
".",
"requestedMarkupBehavior",
".",
"set",
"(",
"requestedMarkupBehavior",
")",
";",
"}",
"}",
"</s>"
] |
12,314 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"RenderInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"spi",
".",
"PortletInvocationContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractPortalContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractSecurityContext",
";",
"public",
"class",
"TestRenderInvocation",
"extends",
"RenderInvocation",
"{",
"public",
"TestRenderInvocation",
"(",
"PortletInvocationContext",
"ctx",
")",
"throws",
"IllegalArgumentException",
"{",
"super",
"(",
"ctx",
")",
";",
"setPortalContext",
"(",
"new",
"AbstractPortalContext",
"(",
")",
")",
";",
"setSecurityContext",
"(",
"new",
"AbstractSecurityContext",
"(",
"MockHttpServletRequest",
".",
"createMockRequest",
"(",
"null",
")",
")",
")",
";",
"setWindowContext",
"(",
"new",
"TestWindowContext",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
12,315 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"CookieProtocol",
";",
"public",
"interface",
"TestWSRPProducer",
"{",
"void",
"reset",
"(",
")",
";",
"BehaviorRegistry",
"getBehaviorRegistry",
"(",
")",
";",
"void",
"setCurrentMarkupBehaviorHandle",
"(",
"String",
"handle",
")",
";",
"void",
"setRequiresInitCookie",
"(",
"CookieProtocol",
"requiresInitCookie",
")",
";",
"void",
"usingStrictModeChangedTo",
"(",
"boolean",
"strictMode",
")",
";",
"}",
"</s>"
] |
12,316 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v2",
".",
"WSRP2ExceptionFactory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"public",
"class",
"BehaviorRegistry",
"{",
"private",
"final",
"Map",
"<",
"String",
",",
"MarkupBehavior",
">",
"behaviors",
"=",
"new",
"HashMap",
"<",
"String",
",",
"MarkupBehavior",
">",
"(",
")",
";",
"private",
"PortletManagementBehavior",
"portletManagementBehavior",
";",
"private",
"ServiceDescriptionBehavior",
"serviceDescriptionBehavior",
";",
"private",
"RegistrationBehavior",
"registrationBehavior",
";",
"public",
"ServiceDescriptionBehavior",
"getServiceDescriptionBehavior",
"(",
")",
"{",
"if",
"(",
"serviceDescriptionBehavior",
"==",
"null",
")",
"{",
"return",
"ServiceDescriptionBehavior",
".",
"DEFAULT",
";",
"}",
"return",
"serviceDescriptionBehavior",
";",
"}",
"public",
"void",
"clear",
"(",
")",
"{",
"behaviors",
".",
"clear",
"(",
")",
";",
"}",
"public",
"MarkupBehavior",
"getMarkupBehaviorFor",
"(",
"String",
"handle",
")",
"throws",
"InvalidHandle",
"{",
"if",
"(",
"behaviors",
".",
"containsKey",
"(",
"handle",
")",
")",
"{",
"return",
"behaviors",
".",
"get",
"(",
"handle",
")",
";",
"}",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InvalidHandle",
".",
"class",
",",
"\"\"",
"+",
"handle",
"+",
"\"'\"",
",",
"null",
")",
";",
"}",
"public",
"void",
"registerMarkupBehavior",
"(",
"MarkupBehavior",
"behavior",
")",
"{",
"for",
"(",
"String",
"handle",
":",
"behavior",
".",
"getSupportedHandles",
"(",
")",
")",
"{",
"MarkupBehavior",
"existing",
"=",
"behaviors",
".",
"get",
"(",
"handle",
")",
";",
"if",
"(",
"existing",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"behavior",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
"+",
"\"\"",
"+",
"handle",
"+",
"\"\"",
"+",
"existing",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
";",
"}",
"behaviors",
".",
"put",
"(",
"handle",
",",
"behavior",
")",
";",
"}",
"}",
"public",
"PortletManagementBehavior",
"getPortletManagementBehavior",
"(",
")",
"{",
"return",
"portletManagementBehavior",
";",
"}",
"public",
"void",
"setPortletManagementBehavior",
"(",
"PortletManagementBehavior",
"portletManagementBehavior",
")",
"{",
"this",
".",
"portletManagementBehavior",
"=",
"portletManagementBehavior",
";",
"}",
"public",
"void",
"setServiceDescriptionBehavior",
"(",
"ServiceDescriptionBehavior",
"serviceDescriptionBehavior",
")",
"{",
"this",
".",
"serviceDescriptionBehavior",
"=",
"serviceDescriptionBehavior",
";",
"}",
"public",
"RegistrationBehavior",
"getRegistrationBehavior",
"(",
")",
"{",
"return",
"registrationBehavior",
";",
"}",
"public",
"void",
"setRegistrationBehavior",
"(",
"RegistrationBehavior",
"registrationBehavior",
")",
"{",
"this",
".",
"registrationBehavior",
"=",
"registrationBehavior",
";",
"}",
"}",
"</s>"
] |
12,317 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"NotYetImplemented",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v2",
".",
"WSRP2ExceptionFactory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"CookieProtocol",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"CopiedPortlet",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"EventDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"EventParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportByValueNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportNoLongerValid",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportedPortlet",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExtensionDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"FailedPortlets",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"GetRegistrationLifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"HandleEventsFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ImportPortlet",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ImportPortletsFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ImportedPortlet",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InteractionParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ItemDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Lifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelTypes",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletLifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletStateChangeRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Property",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PropertyList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationData",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResetProperty",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RuntimeContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"SessionContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"SetExportLifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"SetRegistrationLifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedWindowState",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UpdateResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2MarkupPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2PortletManagementPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2RegistrationPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2ServiceDescriptionPortType",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"TestWSRPProducerImpl",
"implements",
"TestWSRPProducer",
",",
"WSRPV2MarkupPortType",
",",
"WSRPV2PortletManagementPortType",
",",
"WSRPV2RegistrationPortType",
",",
"WSRPV2ServiceDescriptionPortType",
"{",
"private",
"int",
"sessionExpirationTime",
"=",
"600",
";",
"private",
"CookieProtocol",
"requiresInitCookie",
"=",
"CookieProtocol",
".",
"NONE",
";",
"private",
"BehaviorRegistry",
"behaviorRegistry",
"=",
"new",
"BehaviorRegistry",
"(",
")",
";",
"public",
"static",
"final",
"String",
"USER_COOKIE",
"=",
"\"cookie\"",
";",
"private",
"String",
"currentMarkupBehaviorHandle",
";",
"private",
"boolean",
"strict",
"=",
"true",
";",
"public",
"TestWSRPProducerImpl",
"(",
")",
"{",
"reset",
"(",
")",
";",
"}",
"public",
"BehaviorRegistry",
"getBehaviorRegistry",
"(",
")",
"{",
"return",
"behaviorRegistry",
";",
"}",
"public",
"void",
"setCurrentMarkupBehaviorHandle",
"(",
"String",
"handle",
")",
"{",
"currentMarkupBehaviorHandle",
"=",
"handle",
";",
"}",
"public",
"void",
"reset",
"(",
")",
"{",
"requiresInitCookie",
"=",
"null",
";",
"currentMarkupBehaviorHandle",
"=",
"null",
";",
"behaviorRegistry",
".",
"clear",
"(",
")",
";",
"}",
"private",
"MarkupBehavior",
"getMarkupBehaviorFor",
"(",
"String",
"portletHandle",
")",
"throws",
"InvalidHandle",
"{",
"return",
"behaviorRegistry",
".",
"getMarkupBehaviorFor",
"(",
"portletHandle",
")",
";",
"}",
"private",
"ServiceDescriptionBehavior",
"getServiceDescriptionBehavior",
"(",
")",
"{",
"return",
"behaviorRegistry",
".",
"getServiceDescriptionBehavior",
"(",
")",
";",
"}",
"public",
"PortletManagementBehavior",
"getPortletManagementBehavior",
"(",
")",
"{",
"return",
"behaviorRegistry",
".",
"getPortletManagementBehavior",
"(",
")",
";",
"}",
"public",
"void",
"getServiceDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"portletHandles",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Boolean",
">",
"requiresRegistration",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"PortletDescription",
">",
">",
"offeredPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"userCategoryDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ExtensionDescription",
">",
">",
"extensionDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"customWindowStateDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"customModeDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"CookieProtocol",
">",
"requiresInitCookie",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ModelDescription",
">",
"registrationPropertyDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"locales\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"locales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"EventDescription",
">",
">",
"eventDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"schemaType\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ModelTypes",
">",
"schemaType",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"supportedOptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ExportDescription",
">",
"exportDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Boolean",
">",
"mayReturnRegistrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"ResourceSuspended",
"{",
"getServiceDescriptionBehavior",
"(",
")",
".",
"getServiceDescription",
"(",
"registrationContext",
",",
"desiredLocales",
",",
"portletHandles",
",",
"userContext",
",",
"requiresRegistration",
",",
"offeredPortlets",
",",
"userCategoryDescriptions",
",",
"extensionDescriptions",
",",
"customWindowStateDescriptions",
",",
"customModeDescriptions",
",",
"requiresInitCookie",
",",
"registrationPropertyDescription",
",",
"locales",
",",
"resourceList",
",",
"eventDescriptions",
",",
"schemaType",
",",
"supportedOptions",
",",
"exportDescription",
",",
"mayReturnRegistrationState",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"getMarkup",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"MarkupContext",
">",
"markupContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"SessionContext",
">",
"sessionContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidCookie",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidSession",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"ResourceSuspended",
",",
"UnsupportedLocale",
",",
"UnsupportedMimeType",
",",
"UnsupportedMode",
",",
"UnsupportedWindowState",
"{",
"getMarkupBehaviorFor",
"(",
"portletContext",
".",
"getPortletHandle",
"(",
")",
")",
".",
"getMarkup",
"(",
"registrationContext",
",",
"portletContext",
",",
"runtimeContext",
",",
"userContext",
",",
"markupParams",
",",
"markupContext",
",",
"sessionContext",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"getResource",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"INOUT",
")",
"Holder",
"<",
"PortletContext",
">",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"ResourceParams",
"resourceParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceContext",
">",
"resourceContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"SessionContext",
">",
"sessionContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidCookie",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidSession",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
",",
"UnsupportedLocale",
",",
"UnsupportedMimeType",
",",
"UnsupportedMode",
",",
"UnsupportedWindowState",
"{",
"getMarkupBehaviorFor",
"(",
"portletContext",
".",
"value",
".",
"getPortletHandle",
"(",
")",
")",
".",
"getResource",
"(",
"registrationContext",
",",
"portletContext",
",",
"runtimeContext",
",",
"userContext",
",",
"resourceParams",
",",
"resourceContext",
",",
"sessionContext",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"performBlockingInteraction",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"InteractionParams",
"interactionParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"UpdateResponse",
">",
"updateResponse",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"redirectURL\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"redirectURL",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidCookie",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidSession",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"PortletStateChangeRequired",
",",
"ResourceSuspended",
",",
"UnsupportedLocale",
",",
"UnsupportedMimeType",
",",
"UnsupportedMode",
",",
"UnsupportedWindowState",
"{",
"getMarkupBehaviorFor",
"(",
"portletContext",
".",
"getPortletHandle",
"(",
")",
")",
".",
"performBlockingInteraction",
"(",
"registrationContext",
",",
"portletContext",
",",
"runtimeContext",
",",
"userContext",
",",
"markupParams",
",",
"interactionParams",
",",
"updateResponse",
",",
"redirectURL",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"handleEvents",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"eventParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"EventParams",
"eventParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"UpdateResponse",
">",
"updateResponse",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"failedEvents\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"HandleEventsFailed",
">",
">",
"failedEvents",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidCookie",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidSession",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"PortletStateChangeRequired",
",",
"ResourceSuspended",
",",
"UnsupportedLocale",
",",
"UnsupportedMimeType",
",",
"UnsupportedMode",
",",
"UnsupportedWindowState",
"{",
"getMarkupBehaviorFor",
"(",
"portletContext",
".",
"getPortletHandle",
"(",
")",
")",
".",
"handleEvents",
"(",
"registrationContext",
",",
"portletContext",
",",
"runtimeContext",
",",
"userContext",
",",
"markupParams",
",",
"eventParams",
",",
"updateResponse",
",",
"failedEvents",
",",
"extensions",
")",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"releaseSessions",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"sessionIDs\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"sessionIDs",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"throws",
"AccessDenied",
",",
"InvalidRegistration",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"initCookie",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"throws",
"AccessDenied",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"if",
"(",
"requiresInitCookie",
"==",
"null",
"||",
"CookieProtocol",
".",
"NONE",
".",
"equals",
"(",
"requiresInitCookie",
")",
")",
"{",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"OperationFailed",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"try",
"{",
"return",
"getMarkupBehaviorFor",
"(",
"currentMarkupBehaviorHandle",
")",
".",
"initCookie",
"(",
"registrationContext",
",",
"userContext",
")",
";",
"}",
"catch",
"(",
"InvalidHandle",
"invalidHandle",
")",
"{",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"OperationFailed",
".",
"class",
",",
"\"\"",
",",
"invalidHandle",
")",
";",
"}",
"}",
"public",
"void",
"register",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationData",
"registrationData",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"registrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Lifetime",
">",
"scheduledDestruction",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"registrationHandle",
")",
"throws",
"MissingParameters",
",",
"OperationFailed",
",",
"OperationNotSupported",
"{",
"registrationHandle",
".",
"value",
"=",
"\"registration\"",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"deregister",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"throws",
"InvalidRegistration",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"return",
"null",
";",
"}",
"public",
"void",
"modifyRegistration",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationData",
"registrationData",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"registrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Lifetime",
">",
"scheduledDestruction",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"InvalidRegistration",
",",
"MissingParameters",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"}",
"public",
"Lifetime",
"getRegistrationLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"partName",
"=",
"\"\"",
")",
"GetRegistrationLifetime",
"getRegistrationLifetime",
")",
"throws",
"AccessDenied",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"Lifetime",
"setRegistrationLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"partName",
"=",
"\"\"",
")",
"SetRegistrationLifetime",
"setRegistrationLifetime",
")",
"throws",
"AccessDenied",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"getPortletDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"PortletDescription",
">",
"portletDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"getPortletDescription",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"desiredLocales",
",",
"portletDescription",
",",
"resourceList",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"clonePortlet",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"portletHandle",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"portletState\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"portletState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Lifetime",
">",
"scheduledDestruction",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"clonePortlet",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"lifetime",
",",
"portletHandle",
",",
"portletState",
",",
"scheduledDestruction",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"destroyPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"portletHandles",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"InconsistentParameters",
",",
"InvalidRegistration",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"destroyPortlets",
"(",
"registrationContext",
",",
"portletHandles",
",",
"userContext",
",",
"failedPortlets",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"getPortletsLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"PortletContext",
">",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"PortletLifetime",
">",
">",
"portletLifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"getPortletsLifetime",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"portletLifetime",
",",
"failedPortlets",
",",
"resourceList",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"setPortletsLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"PortletContext",
">",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"PortletLifetime",
">",
">",
"updatedPortlet",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"setPortletsLifetime",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"lifetime",
",",
"updatedPortlet",
",",
"failedPortlets",
",",
"resourceList",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"copyPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"toRegistrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"toUserContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"fromRegistrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"fromUserContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"PortletContext",
">",
"fromPortletContexts",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"CopiedPortlet",
">",
">",
"copiedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"copyPortlets",
"(",
"toRegistrationContext",
",",
"toUserContext",
",",
"fromRegistrationContext",
",",
"fromUserContext",
",",
"fromPortletContexts",
",",
"lifetime",
",",
"copiedPortlets",
",",
"failedPortlets",
",",
"resourceList",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"exportPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"PortletContext",
">",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"INOUT",
")",
"Holder",
"<",
"Lifetime",
">",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Boolean",
"exportByValueRequired",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"exportContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ExportedPortlet",
">",
">",
"exportedPortlet",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"ExportByValueNotSupported",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"exportPortlets",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"lifetime",
",",
"exportByValueRequired",
",",
"exportContext",
",",
"exportedPortlet",
",",
"failedPortlets",
",",
"resourceList",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"importPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"byte",
"[",
"]",
"importContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"ImportPortlet",
">",
"importPortlet",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ImportedPortlet",
">",
">",
"importedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"importFailed\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ImportPortletsFailed",
">",
">",
"importFailed",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"ExportNoLongerValid",
",",
"InconsistentParameters",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"importPortlets",
"(",
"registrationContext",
",",
"importContext",
",",
"importPortlet",
",",
"userContext",
",",
"lifetime",
",",
"importedPortlets",
",",
"importFailed",
",",
"resourceList",
",",
"extensions",
")",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"releaseExport",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"byte",
"[",
"]",
"exportContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"{",
"return",
"getPortletManagementBehavior",
"(",
")",
".",
"releaseExport",
"(",
"registrationContext",
",",
"exportContext",
",",
"userContext",
")",
";",
"}",
"public",
"Lifetime",
"setExportLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"partName",
"=",
"\"\"",
")",
"SetExportLifetime",
"setExportLifetime",
")",
"throws",
"AccessDenied",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"return",
"getPortletManagementBehavior",
"(",
")",
".",
"setExportLifetime",
"(",
"setExportLifetime",
")",
";",
"}",
"public",
"void",
"setPortletProperties",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"propertyList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PropertyList",
"propertyList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"portletHandle",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"portletState\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"portletState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Lifetime",
">",
"scheduledDestruction",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"setPortletProperties",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"propertyList",
",",
"portletHandle",
",",
"portletState",
",",
"scheduledDestruction",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"getPortletProperties",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"names\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"names",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"properties\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Property",
">",
">",
"properties",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ResetProperty",
">",
">",
"resetProperties",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"getPortletProperties",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"names",
",",
"properties",
",",
"resetProperties",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"getPortletPropertyDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ModelDescription",
">",
"modelDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"getPortletPropertyDescription",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"desiredLocales",
",",
"modelDescription",
",",
"resourceList",
",",
"extensions",
")",
";",
"}",
"public",
"CookieProtocol",
"getRequiresInitCookie",
"(",
")",
"{",
"return",
"requiresInitCookie",
";",
"}",
"public",
"void",
"setRequiresInitCookie",
"(",
"CookieProtocol",
"requiresInitCookie",
")",
"{",
"this",
".",
"requiresInitCookie",
"=",
"requiresInitCookie",
";",
"getServiceDescriptionBehavior",
"(",
")",
".",
"setRequiresInitCookie",
"(",
"requiresInitCookie",
")",
";",
"}",
"public",
"int",
"getSessionExpirationTime",
"(",
")",
"{",
"return",
"sessionExpirationTime",
";",
"}",
"public",
"void",
"setSessionExpirationTime",
"(",
"int",
"sessionExpirationTime",
")",
"{",
"this",
".",
"sessionExpirationTime",
"=",
"sessionExpirationTime",
";",
"}",
"public",
"void",
"usingStrictModeChangedTo",
"(",
"boolean",
"strictMode",
")",
"{",
"strict",
"=",
"strictMode",
";",
"}",
"}",
"</s>"
] |
12,318 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"NotYetImplemented",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"CopiedPortlet",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportByValueNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportNoLongerValid",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportedPortlet",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"FailedPortlets",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ImportPortlet",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ImportPortletsFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ImportedPortlet",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Lifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletLifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Property",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PropertyList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResetProperty",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"SetExportLifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2PortletManagementPortType",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"PortletManagementBehavior",
"extends",
"TestProducerBehavior",
"implements",
"WSRPV2PortletManagementPortType",
"{",
"public",
"void",
"getPortletPropertyDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ModelDescription",
">",
"modelDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"public",
"void",
"getPortletDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"PortletDescription",
">",
"portletDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"public",
"void",
"clonePortlet",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"portletHandle",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"portletState\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"portletState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Lifetime",
">",
"scheduledDestruction",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"public",
"void",
"destroyPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"portletHandles",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"InconsistentParameters",
",",
"InvalidRegistration",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"public",
"void",
"getPortletsLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"PortletContext",
">",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"PortletLifetime",
">",
">",
"portletLifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"setPortletsLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"PortletContext",
">",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"PortletLifetime",
">",
">",
"updatedPortlet",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"copyPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"toRegistrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"toUserContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"fromRegistrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"fromUserContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"PortletContext",
">",
"fromPortletContexts",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"CopiedPortlet",
">",
">",
"copiedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"exportPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"PortletContext",
">",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"INOUT",
")",
"Holder",
"<",
"Lifetime",
">",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Boolean",
"exportByValueRequired",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"exportContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ExportedPortlet",
">",
">",
"exportedPortlet",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"ExportByValueNotSupported",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"importPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"byte",
"[",
"]",
"importContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"ImportPortlet",
">",
"importPortlet",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ImportedPortlet",
">",
">",
"importedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"importFailed\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ImportPortletsFailed",
">",
">",
"importFailed",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"ExportNoLongerValid",
",",
"InconsistentParameters",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"releaseExport",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"byte",
"[",
"]",
"exportContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"Lifetime",
"setExportLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"partName",
"=",
"\"\"",
")",
"SetExportLifetime",
"setExportLifetime",
")",
"throws",
"AccessDenied",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"setPortletProperties",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"propertyList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PropertyList",
"propertyList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"portletHandle",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"portletState\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"portletState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Lifetime",
">",
"scheduledDestruction",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"public",
"void",
"getPortletProperties",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"names\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"names",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"properties\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Property",
">",
">",
"properties",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ResetProperty",
">",
">",
"resetProperties",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"}",
"</s>"
] |
12,319 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"net",
".",
"media",
".",
"MediaType",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPConstants",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPTypeFactory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"LocalizedString",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"public",
"abstract",
"class",
"TestProducerBehavior",
"{",
"protected",
"int",
"callCount",
";",
"public",
"static",
"final",
"String",
"SAMPLE_DESCRIPTION",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"SAMPLE_SHORTTITLE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"SAMPLE_TITLE",
"=",
"\"SampleTitle\"",
";",
"public",
"static",
"final",
"String",
"SAMPLE_DISPLAYNAME",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"SAMPLE_KEYWORD",
"=",
"\"keyword\"",
";",
"public",
"void",
"incrementCallCount",
"(",
")",
"{",
"callCount",
"++",
";",
"}",
"public",
"int",
"getCallCount",
"(",
")",
"{",
"return",
"callCount",
";",
"}",
"public",
"PortletDescription",
"createPortletDescription",
"(",
"String",
"portletHandle",
",",
"String",
"suffix",
")",
"{",
"String",
"mimeType",
"=",
"MediaType",
".",
"TEXT_HTML",
".",
"getValue",
"(",
")",
";",
"List",
"<",
"String",
">",
"modes",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"modes",
".",
"add",
"(",
"WSRPConstants",
".",
"VIEW_MODE",
")",
";",
"List",
"<",
"String",
">",
"windowStates",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"windowStates",
".",
"add",
"(",
"WSRPConstants",
".",
"NORMAL_WINDOW_STATE",
")",
";",
"MarkupType",
"markupType",
"=",
"WSRPTypeFactory",
".",
"createMarkupType",
"(",
"mimeType",
",",
"modes",
",",
"windowStates",
",",
"WSRPConstants",
".",
"getDefaultLocales",
"(",
")",
")",
";",
"List",
"<",
"MarkupType",
">",
"markupTypes",
"=",
"new",
"ArrayList",
"<",
"MarkupType",
">",
"(",
")",
";",
"markupTypes",
".",
"add",
"(",
"markupType",
")",
";",
"PortletDescription",
"portletDesc",
"=",
"WSRPTypeFactory",
".",
"createPortletDescription",
"(",
"portletHandle",
",",
"markupTypes",
")",
";",
"portletDesc",
".",
"getMarkupTypes",
"(",
")",
".",
"add",
"(",
"markupType",
")",
";",
"String",
"suffixString",
"=",
"suffix",
"==",
"null",
"?",
"\"\"",
":",
"suffix",
";",
"portletDesc",
".",
"setDescription",
"(",
"createLocalizedString",
"(",
"SAMPLE_DESCRIPTION",
"+",
"suffixString",
")",
")",
";",
"portletDesc",
".",
"setTitle",
"(",
"createLocalizedString",
"(",
"SAMPLE_TITLE",
"+",
"suffixString",
")",
")",
";",
"portletDesc",
".",
"setShortTitle",
"(",
"createLocalizedString",
"(",
"SAMPLE_SHORTTITLE",
"+",
"suffixString",
")",
")",
";",
"portletDesc",
".",
"setDisplayName",
"(",
"createLocalizedString",
"(",
"SAMPLE_DISPLAYNAME",
"+",
"suffixString",
")",
")",
";",
"portletDesc",
".",
"getKeywords",
"(",
")",
".",
"add",
"(",
"createLocalizedString",
"(",
"SAMPLE_KEYWORD",
"+",
"suffixString",
")",
")",
";",
"return",
"portletDesc",
";",
"}",
"public",
"static",
"LocalizedString",
"createLocalizedString",
"(",
"String",
"value",
")",
"{",
"return",
"WSRPTypeFactory",
".",
"createLocalizedString",
"(",
"value",
")",
";",
"}",
"public",
"static",
"String",
"extractString",
"(",
"org",
".",
"gatein",
".",
"common",
".",
"i18n",
".",
"LocalizedString",
"ls",
")",
"{",
"return",
"ls",
".",
"getPreferredOrBestLocalizedMappingFor",
"(",
"new",
"String",
"[",
"]",
"{",
"\"en\"",
"}",
")",
".",
"getString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
12,320 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v2",
".",
"WSRP2Constants",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"ServiceDescriptionBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"CookieProtocol",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"EventDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExtensionDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ItemDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelTypes",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"SupportedOptionsServiceDescriptionBehavior",
"extends",
"ServiceDescriptionBehavior",
"{",
"@",
"Override",
"public",
"void",
"getServiceDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"portletHandles",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Boolean",
">",
"requiresRegistration",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"PortletDescription",
">",
">",
"offeredPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"userCategoryDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ExtensionDescription",
">",
">",
"extensionDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"customWindowStateDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"customModeDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"CookieProtocol",
">",
"requiresInitCookie",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ModelDescription",
">",
"registrationPropertyDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"locales\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"locales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"EventDescription",
">",
">",
"eventDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"schemaType\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ModelTypes",
">",
"schemaType",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"supportedOptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ExportDescription",
">",
"exportDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Boolean",
">",
"mayReturnRegistrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"ResourceSuspended",
"{",
"super",
".",
"getServiceDescription",
"(",
"registrationContext",
",",
"desiredLocales",
",",
"portletHandles",
",",
"userContext",
",",
"requiresRegistration",
",",
"offeredPortlets",
",",
"userCategoryDescriptions",
",",
"extensionDescriptions",
",",
"customWindowStateDescriptions",
",",
"customModeDescriptions",
",",
"requiresInitCookie",
",",
"registrationPropertyDescription",
",",
"locales",
",",
"resourceList",
",",
"eventDescriptions",
",",
"schemaType",
",",
"supportedOptions",
",",
"exportDescription",
",",
"mayReturnRegistrationState",
",",
"extensions",
")",
";",
"supportedOptions",
".",
"value",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
"2",
")",
";",
"supportedOptions",
".",
"value",
".",
"add",
"(",
"WSRP2Constants",
".",
"OPTIONS_EXPORT",
")",
";",
"supportedOptions",
".",
"value",
".",
"add",
"(",
"WSRP2Constants",
".",
"OPTIONS_IMPORT",
")",
";",
"}",
"}",
"</s>"
] |
12,321 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPTypeFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"api",
".",
"extensions",
".",
"UnmarshalledExtension",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"payload",
".",
"PayloadUtils",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InteractionParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletStateChangeRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RuntimeContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedWindowState",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UpdateResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"org",
".",
"w3c",
".",
"dom",
".",
"Element",
";",
"import",
"org",
".",
"w3c",
".",
"dom",
".",
"Node",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"ExtensionMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PORTLET_HANDLE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"SIMPLE_SUCCESS",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"ELEMENT_SUCCESS",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"FAILURE",
"=",
"\"Failure!\"",
";",
"public",
"static",
"final",
"String",
"EXPECTED_REQUEST_EXTENSION_VALUE",
"=",
"\"foo\"",
";",
"public",
"static",
"final",
"String",
"EXPECTED_RESPONSE_EXTENSION_VALUE",
"=",
"\"bar\"",
";",
"private",
"static",
"Element",
"ELEMENT_RESPONSE",
";",
"static",
"{",
"final",
"String",
"namespaceURI",
"=",
"\"\"",
";",
"ELEMENT_RESPONSE",
"=",
"PayloadUtils",
".",
"createElement",
"(",
"namespaceURI",
",",
"\"\"",
")",
";",
"Node",
"state",
"=",
"ELEMENT_RESPONSE",
".",
"getOwnerDocument",
"(",
")",
".",
"createElementNS",
"(",
"namespaceURI",
",",
"\"state\"",
")",
";",
"state",
"=",
"ELEMENT_RESPONSE",
".",
"appendChild",
"(",
"state",
")",
";",
"state",
".",
"setTextContent",
"(",
"ExtensionMarkupBehavior",
".",
"EXPECTED_RESPONSE_EXTENSION_VALUE",
")",
";",
"}",
"private",
"static",
"enum",
"Status",
"{",
"simple",
"(",
"SIMPLE_SUCCESS",
",",
"EXPECTED_RESPONSE_EXTENSION_VALUE",
")",
",",
"element",
"(",
"ELEMENT_SUCCESS",
",",
"ELEMENT_RESPONSE",
")",
",",
"failure",
"(",
"FAILURE",
",",
"null",
")",
";",
"private",
"Status",
"(",
"String",
"markup",
",",
"Object",
"response",
")",
"{",
"this",
".",
"markup",
"=",
"markup",
";",
"this",
".",
"response",
"=",
"response",
";",
"}",
"private",
"final",
"String",
"markup",
";",
"private",
"final",
"Object",
"response",
";",
"}",
"private",
"Status",
"status",
";",
"public",
"ExtensionMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"registerHandle",
"(",
"PORTLET_HANDLE",
")",
";",
"}",
"@",
"Override",
"protected",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"GetMarkup",
"getMarkup",
")",
"throws",
"UnsupportedWindowState",
",",
"InvalidCookie",
",",
"InvalidSession",
",",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"UnsupportedLocale",
",",
"UnsupportedMode",
",",
"OperationFailed",
",",
"MissingParameters",
",",
"InvalidUserCategory",
",",
"InvalidRegistration",
",",
"UnsupportedMimeType",
"{",
"status",
"=",
"Status",
".",
"failure",
";",
"getStatus",
"(",
"getMarkup",
".",
"getMarkupParams",
"(",
")",
".",
"getExtensions",
"(",
")",
")",
";",
"return",
"status",
".",
"markup",
";",
"}",
"@",
"Override",
"public",
"void",
"modifyResponseIfNeeded",
"(",
"MarkupResponse",
"markupResponse",
")",
"{",
"final",
"List",
"<",
"Extension",
">",
"extensions",
"=",
"markupResponse",
".",
"getExtensions",
"(",
")",
";",
"addExtensions",
"(",
"extensions",
")",
";",
"}",
"private",
"void",
"addExtensions",
"(",
"List",
"<",
"Extension",
">",
"extensions",
")",
"{",
"if",
"(",
"!",
"Status",
".",
"failure",
".",
"equals",
"(",
"status",
")",
")",
"{",
"extensions",
".",
"add",
"(",
"WSRPTypeFactory",
".",
"createExtension",
"(",
"PayloadUtils",
".",
"marshallExtension",
"(",
"status",
".",
"response",
")",
")",
")",
";",
"}",
"}",
"@",
"Override",
"public",
"void",
"performBlockingInteraction",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"InteractionParams",
"interactionParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"UpdateResponse",
">",
"updateResponse",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"redirectURL\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"redirectURL",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidCookie",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidSession",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"PortletStateChangeRequired",
",",
"ResourceSuspended",
",",
"UnsupportedLocale",
",",
"UnsupportedMimeType",
",",
"UnsupportedMode",
",",
"UnsupportedWindowState",
"{",
"status",
"=",
"Status",
".",
"failure",
";",
"getStatus",
"(",
"interactionParams",
".",
"getExtensions",
"(",
")",
")",
";",
"UpdateResponse",
"ur",
"=",
"WSRPTypeFactory",
".",
"createUpdateResponse",
"(",
")",
";",
"updateResponse",
".",
"value",
"=",
"ur",
";",
"final",
"List",
"<",
"Extension",
">",
"responseExtensions",
"=",
"ur",
".",
"getExtensions",
"(",
")",
";",
"addExtensions",
"(",
"responseExtensions",
")",
";",
"extensions",
".",
"value",
"=",
"responseExtensions",
";",
"}",
"private",
"void",
"getStatus",
"(",
"List",
"<",
"Extension",
">",
"requestExtensions",
")",
"{",
"if",
"(",
"!",
"requestExtensions",
".",
"isEmpty",
"(",
")",
")",
"{",
"final",
"Extension",
"extension",
"=",
"requestExtensions",
".",
"get",
"(",
"0",
")",
";",
"final",
"UnmarshalledExtension",
"unmarshalledExtension",
"=",
"PayloadUtils",
".",
"unmarshallExtension",
"(",
"extension",
".",
"getAny",
"(",
")",
")",
";",
"if",
"(",
"unmarshalledExtension",
".",
"isElement",
"(",
")",
")",
"{",
"final",
"Element",
"element",
"=",
"(",
"Element",
")",
"unmarshalledExtension",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"EXPECTED_REQUEST_EXTENSION_VALUE",
".",
"equals",
"(",
"element",
".",
"getTextContent",
"(",
")",
")",
")",
"{",
"status",
"=",
"Status",
".",
"element",
";",
"}",
"}",
"else",
"{",
"final",
"String",
"foo",
"=",
"(",
"String",
")",
"unmarshalledExtension",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"EXPECTED_REQUEST_EXTENSION_VALUE",
".",
"equals",
"(",
"foo",
")",
")",
"{",
"status",
"=",
"Status",
".",
"simple",
";",
"}",
"}",
"}",
"}",
"}",
"</s>"
] |
12,322 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"ServiceDescriptionBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"CookieProtocol",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"EventDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExtensionDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ItemDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelTypes",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"GroupedPortletsServiceDescriptionBehavior",
"extends",
"ServiceDescriptionBehavior",
"{",
"public",
"GroupedPortletsServiceDescriptionBehavior",
"(",
"List",
"<",
"PortletDescription",
">",
"offeredPortlets",
")",
"{",
"this",
".",
"offeredPortlets",
"=",
"offeredPortlets",
";",
"}",
"@",
"Override",
"public",
"void",
"getServiceDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"portletHandles",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Boolean",
">",
"requiresRegistration",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"PortletDescription",
">",
">",
"offeredPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"userCategoryDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ExtensionDescription",
">",
">",
"extensionDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"customWindowStateDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"customModeDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"CookieProtocol",
">",
"requiresInitCookie",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ModelDescription",
">",
"registrationPropertyDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"locales\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"locales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"EventDescription",
">",
">",
"eventDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"schemaType\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ModelTypes",
">",
"schemaType",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"supportedOptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ExportDescription",
">",
"exportDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Boolean",
">",
"mayReturnRegistrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"ResourceSuspended",
"{",
"super",
".",
"getServiceDescription",
"(",
"registrationContext",
",",
"desiredLocales",
",",
"portletHandles",
",",
"userContext",
",",
"requiresRegistration",
",",
"offeredPortlets",
",",
"userCategoryDescriptions",
",",
"extensionDescriptions",
",",
"customWindowStateDescriptions",
",",
"customModeDescriptions",
",",
"requiresInitCookie",
",",
"registrationPropertyDescription",
",",
"locales",
",",
"resourceList",
",",
"eventDescriptions",
",",
"schemaType",
",",
"supportedOptions",
",",
"exportDescription",
",",
"mayReturnRegistrationState",
",",
"extensions",
")",
";",
"List",
"<",
"PortletDescription",
">",
"portletDescriptions",
"=",
"offeredPortlets",
".",
"value",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"portletDescriptions",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"portletDescriptions",
".",
"get",
"(",
"i",
")",
".",
"setGroupID",
"(",
"\"group\"",
"+",
"i",
"%",
"3",
")",
";",
"}",
"}",
"}",
"</s>"
] |
12,323 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v2",
".",
"WSRP2ExceptionFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"DestroyClonesPortletManagementBehavior",
"extends",
"BasicPortletManagementBehavior",
"{",
"public",
"DestroyClonesPortletManagementBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"getPortletDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"PortletDescription",
">",
"portletDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"if",
"(",
"getCallCount",
"(",
")",
"==",
"0",
")",
"{",
"incrementCallCount",
"(",
")",
";",
"super",
".",
"getPortletDescription",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"desiredLocales",
",",
"portletDescription",
",",
"resourceList",
",",
"extensions",
")",
";",
"}",
"else",
"{",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InvalidHandle",
".",
"class",
",",
"\"\"",
"+",
"portletContext",
".",
"getPortletHandle",
"(",
")",
",",
"null",
")",
";",
"}",
"}",
"}",
"</s>"
] |
12,324 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"handler",
".",
"RequestHeaderClientHandler",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"handler",
".",
"MockSOAPMessage",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"handler",
".",
"MockSOAPMessageContext",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"soap",
".",
"MimeHeaders",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"handler",
".",
"soap",
".",
"SOAPMessageContext",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"PerUserInitCookieMarkupBehavior",
"extends",
"InitCookieMarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PER_USER_INIT_COOKIE_HANDLE",
"=",
"\"\"",
";",
"public",
"PerUserInitCookieMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"}",
"protected",
"void",
"initPortletHandle",
"(",
")",
"{",
"portletHandle",
"=",
"PER_USER_INIT_COOKIE_HANDLE",
";",
"}",
"@",
"Override",
"public",
"List",
"<",
"Extension",
">",
"initCookie",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"throws",
"AccessDenied",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"MockSOAPMessage",
"message",
"=",
"new",
"MockSOAPMessage",
"(",
")",
";",
"SOAPMessageContext",
"msgContext",
"=",
"MockSOAPMessageContext",
".",
"createMessageContext",
"(",
"message",
",",
"getClass",
"(",
")",
".",
"getClassLoader",
"(",
")",
")",
";",
"MimeHeaders",
"headers",
"=",
"new",
"MimeHeaders",
"(",
")",
";",
"headers",
".",
"setHeader",
"(",
"\"Set-Cookie\"",
",",
"\"name=value\"",
")",
";",
"message",
".",
"setMimeHeaders",
"(",
"headers",
")",
";",
"RequestHeaderClientHandler",
"rhch",
"=",
"new",
"RequestHeaderClientHandler",
"(",
")",
";",
"rhch",
".",
"handleResponse",
"(",
"msgContext",
")",
";",
"return",
"super",
".",
"initCookie",
"(",
"registrationContext",
",",
"userContext",
")",
";",
"}",
"}",
"</s>"
] |
12,325 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"OpaqueStateString",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPConstants",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPTypeFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InteractionParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletStateChangeRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RuntimeContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedWindowState",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UpdateResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"BasicMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PORTLET_HANDLE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"NS",
"=",
"\"ns1\"",
";",
"public",
"BasicMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"registerHandle",
"(",
"PORTLET_HANDLE",
")",
";",
"}",
"public",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"GetMarkup",
"getMarkup",
")",
"{",
"StringBuffer",
"markupString",
"=",
"new",
"StringBuffer",
"(",
"\"portlet1:\"",
")",
";",
"markupString",
".",
"append",
"(",
"mode",
")",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"windowState",
")",
";",
"if",
"(",
"navigationalState",
"!=",
"null",
")",
"{",
"markupString",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"navigationalState",
")",
";",
"}",
"return",
"markupString",
".",
"toString",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"performBlockingInteraction",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"InteractionParams",
"interactionParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"UpdateResponse",
">",
"updateResponse",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"redirectURL\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"redirectURL",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidCookie",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidSession",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"PortletStateChangeRequired",
",",
"ResourceSuspended",
",",
"UnsupportedLocale",
",",
"UnsupportedMimeType",
",",
"UnsupportedMode",
",",
"UnsupportedWindowState",
"{",
"UpdateResponse",
"ur",
"=",
"WSRPTypeFactory",
".",
"createUpdateResponse",
"(",
")",
";",
"ur",
".",
"setNavigationalContext",
"(",
"WSRPTypeFactory",
".",
"createNavigationalContextOrNull",
"(",
"new",
"OpaqueStateString",
"(",
"NS",
")",
",",
"null",
")",
")",
";",
"updateResponse",
".",
"value",
"=",
"ur",
";",
"extensions",
".",
"value",
"=",
"ur",
".",
"getExtensions",
"(",
")",
";",
"}",
"public",
"void",
"modifyResponseIfNeeded",
"(",
"MarkupResponse",
"markupResponse",
")",
"{",
"markupResponse",
".",
"getMarkupContext",
"(",
")",
".",
"setCacheControl",
"(",
"WSRPTypeFactory",
".",
"createCacheControl",
"(",
"15",
",",
"WSRPConstants",
".",
"CACHE_PER_USER",
")",
")",
";",
"}",
"}",
"</s>"
] |
12,326 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"GetMarkup",
";",
"public",
"class",
"EmptyMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PORTLET_HANDLE",
"=",
"\"EmptyMarkup\"",
";",
"public",
"EmptyMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"registerHandle",
"(",
"PORTLET_HANDLE",
")",
";",
"}",
"public",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"GetMarkup",
"getMarkup",
")",
"{",
"return",
"\"\"",
";",
"}",
"}",
"</s>"
] |
12,327 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"NotYetImplemented",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"util",
".",
"ParameterValidation",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPTypeFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v2",
".",
"ErrorCodes",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v2",
".",
"WSRP2ExceptionFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"PortletManagementBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"CopiedPortlet",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportByValueNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportNoLongerValid",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportedPortlet",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"FailedPortlets",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ImportPortlet",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ImportPortletsFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ImportedPortlet",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Lifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletLifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Property",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PropertyList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResetProperty",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"SetExportLifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"namespace",
".",
"QName",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"BasicPortletManagementBehavior",
"extends",
"PortletManagementBehavior",
"{",
"private",
"static",
"final",
"String",
"CLONE_SUFFIX",
"=",
"\"_clone\"",
";",
"public",
"static",
"final",
"String",
"PROPERTY_NAME",
"=",
"\"prop1\"",
";",
"public",
"static",
"final",
"String",
"PROPERTY_VALUE",
"=",
"\"value1\"",
";",
"public",
"static",
"final",
"String",
"PROPERTY_NEW_VALUE",
"=",
"\"value2\"",
";",
"public",
"static",
"final",
"String",
"CLONED_HANDLE",
"=",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
"+",
"CLONE_SUFFIX",
";",
"public",
"static",
"final",
"String",
"CANNOT_BOTH_SET_AND_RESET_A_PROPERTY_AT_THE_SAME_TIME",
"=",
"\"\"",
";",
"private",
"BehaviorRegistry",
"registry",
";",
"private",
"String",
"propValue",
"=",
"PROPERTY_VALUE",
";",
"public",
"BasicPortletManagementBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
")",
";",
"this",
".",
"registry",
"=",
"registry",
";",
"}",
"@",
"Override",
"public",
"void",
"getPortletPropertyDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ModelDescription",
">",
"modelDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"getPortletDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"PortletDescription",
">",
"portletDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"super",
".",
"getPortletDescription",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"desiredLocales",
",",
"portletDescription",
",",
"resourceList",
",",
"extensions",
")",
";",
"String",
"handle",
"=",
"getHandleFrom",
"(",
"portletContext",
",",
"\"\"",
")",
";",
"int",
"index",
"=",
"handle",
".",
"indexOf",
"(",
"CLONE_SUFFIX",
")",
";",
"if",
"(",
"index",
"!=",
"-",
"1",
")",
"{",
"handle",
"=",
"handle",
".",
"substring",
"(",
"0",
",",
"index",
")",
";",
"}",
"MarkupBehavior",
"markupBehaviorFor",
"=",
"registry",
".",
"getMarkupBehaviorFor",
"(",
"handle",
")",
";",
"PortletDescription",
"description",
"=",
"markupBehaviorFor",
".",
"getPortletDescriptionFor",
"(",
"handle",
")",
";",
"if",
"(",
"index",
"!=",
"-",
"1",
")",
"{",
"description",
".",
"setPortletHandle",
"(",
"handle",
"+",
"CLONE_SUFFIX",
")",
";",
"}",
"portletDescription",
".",
"value",
"=",
"description",
";",
"}",
"@",
"Override",
"public",
"void",
"clonePortlet",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"portletHandle",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"portletState\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"portletState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Lifetime",
">",
"scheduledDestruction",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"String",
"handle",
"=",
"getHandleFrom",
"(",
"portletContext",
",",
"\"\"",
")",
";",
"if",
"(",
"!",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
".",
"equals",
"(",
"handle",
")",
")",
"{",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InvalidHandle",
".",
"class",
",",
"\"\"",
"+",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
"+",
"\"'\"",
",",
"null",
")",
";",
"}",
"portletHandle",
".",
"value",
"=",
"CLONED_HANDLE",
";",
"}",
"@",
"Override",
"public",
"void",
"destroyPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"portletHandles",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"InconsistentParameters",
",",
"InvalidRegistration",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"super",
".",
"destroyPortlets",
"(",
"registrationContext",
",",
"portletHandles",
",",
"userContext",
",",
"failedPortlets",
",",
"extensions",
")",
";",
"WSRP2ExceptionFactory",
".",
"throwMissingParametersIfValueIsMissing",
"(",
"portletHandles",
",",
"\"\"",
",",
"\"\"",
")",
";",
"if",
"(",
"portletHandles",
".",
"isEmpty",
"(",
")",
")",
"{",
"WSRP2ExceptionFactory",
".",
"throwMissingParametersIfValueIsMissing",
"(",
"portletHandles",
",",
"\"\"",
",",
"\"\"",
")",
";",
"}",
"List",
"<",
"FailedPortlets",
">",
"failedPortletsList",
"=",
"failedPortlets",
".",
"value",
";",
"if",
"(",
"failedPortletsList",
"==",
"null",
")",
"{",
"failedPortletsList",
"=",
"new",
"ArrayList",
"<",
"FailedPortlets",
">",
"(",
")",
";",
"failedPortlets",
".",
"value",
"=",
"failedPortletsList",
";",
"}",
"for",
"(",
"String",
"handle",
":",
"portletHandles",
")",
"{",
"if",
"(",
"!",
"CLONED_HANDLE",
".",
"equals",
"(",
"handle",
")",
")",
"{",
"ArrayList",
"<",
"String",
">",
"failed",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"failed",
".",
"add",
"(",
"handle",
")",
";",
"failedPortletsList",
".",
"add",
"(",
"WSRPTypeFactory",
".",
"createFailedPortlets",
"(",
"failed",
",",
"ErrorCodes",
".",
"Codes",
".",
"OPERATIONFAILED",
",",
"\"Handle",
"'\"",
"+",
"handle",
"+",
"\"\"",
")",
")",
";",
"}",
"}",
"}",
"@",
"Override",
"public",
"void",
"getPortletsLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"PortletContext",
">",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"PortletLifetime",
">",
">",
"portletLifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"setPortletsLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"PortletContext",
">",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"PortletLifetime",
">",
">",
"updatedPortlet",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"copyPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"toRegistrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"toUserContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"fromRegistrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"fromUserContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"PortletContext",
">",
"fromPortletContexts",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"CopiedPortlet",
">",
">",
"copiedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"exportPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"PortletContext",
">",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"INOUT",
")",
"Holder",
"<",
"Lifetime",
">",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Boolean",
"exportByValueRequired",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"exportContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ExportedPortlet",
">",
">",
"exportedPortlet",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"FailedPortlets",
">",
">",
"failedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"ExportByValueNotSupported",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"List",
"<",
"String",
">",
"failedPortletHandles",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"PortletContext",
"context",
":",
"portletContext",
")",
"{",
"String",
"portletHandle",
"=",
"context",
".",
"getPortletHandle",
"(",
")",
";",
"if",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
".",
"equals",
"(",
"portletHandle",
")",
")",
"{",
"exportedPortlet",
".",
"value",
"=",
"new",
"ArrayList",
"<",
"ExportedPortlet",
">",
"(",
")",
";",
"exportedPortlet",
".",
"value",
".",
"add",
"(",
"WSRPTypeFactory",
".",
"createExportedPortlet",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"new",
"byte",
"[",
"]",
"{",
"1",
",",
"2",
",",
"3",
",",
"4",
"}",
")",
")",
";",
"}",
"else",
"{",
"failedPortletHandles",
".",
"add",
"(",
"portletHandle",
")",
";",
"}",
"}",
"if",
"(",
"!",
"failedPortletHandles",
".",
"isEmpty",
"(",
")",
")",
"{",
"failedPortlets",
".",
"value",
"=",
"new",
"ArrayList",
"<",
"FailedPortlets",
">",
"(",
")",
";",
"failedPortlets",
".",
"value",
".",
"add",
"(",
"WSRPTypeFactory",
".",
"createFailedPortlets",
"(",
"failedPortletHandles",
",",
"ErrorCodes",
".",
"Codes",
".",
"INVALIDHANDLE",
",",
"\"\"",
")",
")",
";",
"}",
"}",
"@",
"Override",
"public",
"void",
"importPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"byte",
"[",
"]",
"importContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"ImportPortlet",
">",
"importPortlet",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ImportedPortlet",
">",
">",
"importedPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"importFailed\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ImportPortletsFailed",
">",
">",
"importFailed",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"ExportNoLongerValid",
",",
"InconsistentParameters",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"List",
"<",
"Extension",
">",
"releaseExport",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"byte",
"[",
"]",
"exportContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"Lifetime",
"setExportLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"partName",
"=",
"\"\"",
")",
"SetExportLifetime",
"setExportLifetime",
")",
"throws",
"AccessDenied",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"setPortletProperties",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"propertyList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PropertyList",
"propertyList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"portletHandle",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"portletState\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"portletState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Lifetime",
">",
"scheduledDestruction",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"String",
"handle",
"=",
"getHandleFrom",
"(",
"portletContext",
",",
"\"\"",
")",
";",
"if",
"(",
"!",
"(",
"CLONED_HANDLE",
")",
".",
"equals",
"(",
"handle",
")",
")",
"{",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"OperationFailed",
".",
"class",
",",
"\"\"",
"+",
"handle",
"+",
"\"'\"",
",",
"null",
")",
";",
"}",
"List",
"<",
"Property",
">",
"properties",
"=",
"propertyList",
".",
"getProperties",
"(",
")",
";",
"List",
"<",
"ResetProperty",
">",
"resetProperties",
"=",
"propertyList",
".",
"getResetProperties",
"(",
")",
";",
"if",
"(",
"ParameterValidation",
".",
"existsAndIsNotEmpty",
"(",
"properties",
")",
"&&",
"ParameterValidation",
".",
"existsAndIsNotEmpty",
"(",
"resetProperties",
")",
")",
"{",
"if",
"(",
"properties",
".",
"size",
"(",
")",
"!=",
"1",
"&&",
"resetProperties",
".",
"size",
"(",
")",
"!=",
"1",
")",
"{",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InconsistentParameters",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"if",
"(",
"properties",
".",
"get",
"(",
"0",
")",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"resetProperties",
".",
"get",
"(",
"0",
")",
".",
"getName",
"(",
")",
")",
")",
"{",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InconsistentParameters",
".",
"class",
",",
"CANNOT_BOTH_SET_AND_RESET_A_PROPERTY_AT_THE_SAME_TIME",
",",
"null",
")",
";",
"}",
"}",
"if",
"(",
"ParameterValidation",
".",
"existsAndIsNotEmpty",
"(",
"properties",
")",
")",
"{",
"if",
"(",
"properties",
".",
"size",
"(",
")",
"!=",
"1",
")",
"{",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InconsistentParameters",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"Property",
"property",
"=",
"properties",
".",
"get",
"(",
"0",
")",
";",
"QName",
"name",
"=",
"property",
".",
"getName",
"(",
")",
";",
"if",
"(",
"name",
".",
"getLocalPart",
"(",
")",
".",
"equals",
"(",
"PROPERTY_NAME",
")",
")",
"{",
"propValue",
"=",
"property",
".",
"getStringValue",
"(",
")",
";",
"}",
"else",
"{",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InconsistentParameters",
".",
"class",
",",
"\"\"",
"+",
"name",
"+",
"\"'\"",
",",
"null",
")",
";",
"}",
"}",
"if",
"(",
"ParameterValidation",
".",
"existsAndIsNotEmpty",
"(",
"resetProperties",
")",
")",
"{",
"if",
"(",
"resetProperties",
".",
"size",
"(",
")",
"!=",
"1",
")",
"{",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InconsistentParameters",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"ResetProperty",
"resetProperty",
"=",
"resetProperties",
".",
"get",
"(",
"0",
")",
";",
"QName",
"name",
"=",
"resetProperty",
".",
"getName",
"(",
")",
";",
"if",
"(",
"name",
".",
"getLocalPart",
"(",
")",
".",
"equals",
"(",
"PROPERTY_NAME",
")",
")",
"{",
"propValue",
"=",
"PROPERTY_VALUE",
";",
"}",
"else",
"{",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InconsistentParameters",
".",
"class",
",",
"\"\"",
"+",
"name",
"+",
"\"'\"",
",",
"null",
")",
";",
"}",
"}",
"portletHandle",
".",
"value",
"=",
"handle",
";",
"}",
"@",
"Override",
"public",
"void",
"getPortletProperties",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"names\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"names",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"properties\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Property",
">",
">",
"properties",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ResetProperty",
">",
">",
"resetProperties",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"String",
"handle",
"=",
"getHandleFrom",
"(",
"portletContext",
",",
"\"\"",
")",
";",
"List",
"<",
"Property",
">",
"propertyList",
"=",
"new",
"ArrayList",
"<",
"Property",
">",
"(",
"1",
")",
";",
"if",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
".",
"equals",
"(",
"handle",
")",
")",
"{",
"propertyList",
".",
"add",
"(",
"WSRPTypeFactory",
".",
"createProperty",
"(",
"PROPERTY_NAME",
",",
"\"en\"",
",",
"PROPERTY_VALUE",
")",
")",
";",
"}",
"else",
"if",
"(",
"CLONED_HANDLE",
".",
"equals",
"(",
"handle",
")",
")",
"{",
"if",
"(",
"propValue",
"!=",
"null",
")",
"{",
"propertyList",
".",
"add",
"(",
"WSRPTypeFactory",
".",
"createProperty",
"(",
"PROPERTY_NAME",
",",
"\"en\"",
",",
"propValue",
")",
")",
";",
"}",
"if",
"(",
"callCount",
">",
"4",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"\"",
")",
";",
"}",
"}",
"else",
"{",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InvalidHandle",
".",
"class",
",",
"\"\"",
"+",
"handle",
"+",
"\"'\"",
",",
"null",
")",
";",
"}",
"incrementCallCount",
"(",
")",
";",
"properties",
".",
"value",
"=",
"propertyList",
";",
"}",
"private",
"String",
"getHandleFrom",
"(",
"PortletContext",
"portletContext",
",",
"String",
"context",
")",
"throws",
"MissingParameters",
",",
"InvalidHandle",
"{",
"WSRP2ExceptionFactory",
".",
"throwMissingParametersIfValueIsMissing",
"(",
"portletContext",
",",
"\"\"",
",",
"context",
")",
";",
"String",
"handle",
"=",
"portletContext",
".",
"getPortletHandle",
"(",
")",
";",
"WSRP2ExceptionFactory",
".",
"throwMissingParametersIfValueIsMissing",
"(",
"handle",
",",
"\"\"",
",",
"\"\"",
")",
";",
"if",
"(",
"handle",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InvalidHandle",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"return",
"handle",
";",
"}",
"}",
"</s>"
] |
12,328 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v2",
".",
"WSRP2ExceptionFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"PerGroupInitCookieMarkupBehavior",
"extends",
"InitCookieMarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PER_GROUP_INIT_COOKIE_HANDLE",
"=",
"\"\"",
";",
"public",
"PerGroupInitCookieMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"}",
"protected",
"void",
"initPortletHandle",
"(",
")",
"{",
"portletHandle",
"=",
"PER_GROUP_INIT_COOKIE_HANDLE",
";",
"}",
"@",
"Override",
"public",
"List",
"<",
"Extension",
">",
"initCookie",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"throws",
"AccessDenied",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"List",
"<",
"Extension",
">",
"extensions",
"=",
"super",
".",
"initCookie",
"(",
"registrationContext",
",",
"userContext",
")",
";",
"if",
"(",
"initCookieCallCount",
">",
"3",
")",
"{",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"OperationFailed",
".",
"class",
",",
"\"\"",
",",
"new",
"IllegalStateException",
"(",
"\"\"",
")",
")",
";",
"}",
"return",
"extensions",
";",
"}",
"}",
"</s>"
] |
12,329 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"GetMarkup",
";",
"public",
"class",
"ResourceMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PORTLET_HANDLE",
"=",
"\"resource\"",
";",
"public",
"ResourceMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"registerHandle",
"(",
"PORTLET_HANDLE",
")",
";",
"}",
"protected",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"GetMarkup",
"getMarkup",
")",
"{",
"return",
"\"\"",
"+",
"\"\"",
";",
"}",
"}",
"</s>"
] |
12,330 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"GetMarkup",
";",
"public",
"class",
"NullMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PORTLET_HANDLE",
"=",
"\"NullMarkup\"",
";",
"public",
"NullMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"registerHandle",
"(",
"PORTLET_HANDLE",
")",
";",
"}",
"public",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"GetMarkup",
"getMarkup",
")",
"{",
"return",
"null",
";",
"}",
"}",
"</s>"
] |
12,331 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"OpaqueStateString",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPTypeFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InteractionParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletStateChangeRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RuntimeContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"SessionContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"SessionParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedWindowState",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UpdateResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"SessionMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PORTLET_HANDLE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"SESSION_ID",
"=",
"\"sessionID\"",
";",
"public",
"static",
"final",
"String",
"NS",
"=",
"\"ns2\"",
";",
"private",
"int",
"count",
"=",
"0",
";",
"private",
"String",
"sessionId",
";",
"public",
"SessionMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"registerHandle",
"(",
"PORTLET_HANDLE",
")",
";",
"}",
"public",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"GetMarkup",
"getMarkup",
")",
"{",
"StringBuffer",
"markupString",
"=",
"new",
"StringBuffer",
"(",
"\"portlet2:\"",
")",
";",
"SessionParams",
"sessionParams",
"=",
"getMarkup",
".",
"getRuntimeContext",
"(",
")",
".",
"getSessionParams",
"(",
")",
";",
"if",
"(",
"sessionParams",
"!=",
"null",
")",
"{",
"sessionId",
"=",
"sessionParams",
".",
"getSessionID",
"(",
")",
";",
"}",
"else",
"{",
"sessionId",
"=",
"null",
";",
"}",
"if",
"(",
"SESSION_ID",
".",
"equals",
"(",
"sessionId",
")",
")",
"{",
"count",
"++",
";",
"}",
"markupString",
".",
"append",
"(",
"count",
")",
".",
"append",
"(",
"\":\"",
")",
";",
"markupString",
".",
"append",
"(",
"mode",
")",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"windowState",
")",
";",
"if",
"(",
"navigationalState",
"!=",
"null",
")",
"{",
"markupString",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"navigationalState",
")",
";",
"}",
"return",
"markupString",
".",
"toString",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"performBlockingInteraction",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"InteractionParams",
"interactionParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"UpdateResponse",
">",
"updateResponse",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"redirectURL\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"redirectURL",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidCookie",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidSession",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"PortletStateChangeRequired",
",",
"ResourceSuspended",
",",
"UnsupportedLocale",
",",
"UnsupportedMimeType",
",",
"UnsupportedMode",
",",
"UnsupportedWindowState",
"{",
"UpdateResponse",
"ur",
"=",
"WSRPTypeFactory",
".",
"createUpdateResponse",
"(",
")",
";",
"ur",
".",
"setNavigationalContext",
"(",
"WSRPTypeFactory",
".",
"createNavigationalContextOrNull",
"(",
"new",
"OpaqueStateString",
"(",
"NS",
")",
",",
"null",
")",
")",
";",
"updateResponse",
".",
"value",
"=",
"ur",
";",
"extensions",
".",
"value",
"=",
"ur",
".",
"getExtensions",
"(",
")",
";",
"}",
"public",
"void",
"modifyResponseIfNeeded",
"(",
"MarkupResponse",
"markupResponse",
")",
"{",
"if",
"(",
"count",
"==",
"0",
"||",
"SESSION_ID",
".",
"equals",
"(",
"sessionId",
")",
")",
"{",
"SessionContext",
"sessionContext",
"=",
"WSRPTypeFactory",
".",
"createSessionContext",
"(",
"SESSION_ID",
",",
"30",
")",
";",
"markupResponse",
".",
"setSessionContext",
"(",
"sessionContext",
")",
";",
"}",
"}",
"protected",
"String",
"getSuffixFor",
"(",
"String",
"handle",
")",
"{",
"return",
"\"2\"",
";",
"}",
"}",
"</s>"
] |
12,332 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v2",
".",
"WSRP2ExceptionFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"InitCookieNotRequiredMarkupBehavior",
"extends",
"InitCookieMarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"INIT_COOKIE_NOT_REQUIRED_HANDLE",
"=",
"\"\"",
";",
"public",
"InitCookieNotRequiredMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"}",
"protected",
"void",
"initPortletHandle",
"(",
")",
"{",
"portletHandle",
"=",
"INIT_COOKIE_NOT_REQUIRED_HANDLE",
";",
"}",
"@",
"Override",
"protected",
"String",
"getMarkupString",
"(",
"String",
"handle",
")",
"{",
"return",
"handle",
";",
"}",
"@",
"Override",
"public",
"List",
"<",
"Extension",
">",
"initCookie",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"throws",
"AccessDenied",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"super",
".",
"initCookie",
"(",
"registrationContext",
",",
"userContext",
")",
";",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"OperationFailed",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"}",
"</s>"
] |
12,333 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v2",
".",
"WSRP2ExceptionFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"abstract",
"class",
"InitCookieMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"protected",
"String",
"portletHandle",
";",
"protected",
"int",
"initCookieCallCount",
";",
"private",
"boolean",
"initCookieCalled",
"=",
"false",
";",
"public",
"InitCookieMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"initPortletHandle",
"(",
")",
";",
"registerHandle",
"(",
"portletHandle",
")",
";",
"}",
"protected",
"abstract",
"void",
"initPortletHandle",
"(",
")",
";",
"protected",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"GetMarkup",
"getMarkup",
")",
"throws",
"OperationFailed",
",",
"InvalidCookie",
"{",
"if",
"(",
"!",
"initCookieCalled",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"\"",
")",
";",
"}",
"String",
"handle",
"=",
"getMarkup",
".",
"getPortletContext",
"(",
")",
".",
"getPortletHandle",
"(",
")",
";",
"if",
"(",
"portletHandle",
".",
"equals",
"(",
"handle",
")",
")",
"{",
"return",
"getMarkupString",
"(",
"handle",
")",
";",
"}",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"OperationFailed",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"protected",
"String",
"getMarkupString",
"(",
"String",
"handle",
")",
"throws",
"InvalidCookie",
",",
"OperationFailed",
"{",
"switch",
"(",
"callCount",
"++",
")",
"{",
"case",
"0",
":",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InvalidCookie",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"case",
"1",
":",
"return",
"handle",
";",
"default",
":",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"OperationFailed",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"}",
"@",
"Override",
"public",
"List",
"<",
"Extension",
">",
"initCookie",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"throws",
"AccessDenied",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"initCookieCalled",
"=",
"true",
";",
"initCookieCallCount",
"++",
";",
"return",
"null",
";",
"}",
"public",
"int",
"getInitCookieCallCount",
"(",
")",
"{",
"return",
"initCookieCallCount",
";",
"}",
"}",
"</s>"
] |
12,334 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"ServiceDescriptionBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"public",
"class",
"BasicServiceDescriptionBehavior",
"extends",
"ServiceDescriptionBehavior",
"{",
"public",
"BasicServiceDescriptionBehavior",
"(",
")",
"{",
"PortletDescription",
"pd1",
"=",
"createPortletDescription",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"\"\"",
")",
";",
"PortletDescription",
"pd2",
"=",
"createPortletDescription",
"(",
"SessionMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"\"2\"",
")",
";",
"offeredPortlets",
".",
"add",
"(",
"pd1",
")",
";",
"offeredPortlets",
".",
"add",
"(",
"pd2",
")",
";",
"}",
"}",
"</s>"
] |
12,335 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"NotYetImplemented",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"util",
".",
"Version",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"MarkupService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"PortletManagementService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"RegistrationService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"ServiceDescriptionService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"ServiceFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"v2",
".",
"V2MarkupService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"v2",
".",
"V2PortletManagementService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"v2",
".",
"V2RegistrationService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"v2",
".",
"V2ServiceDescriptionService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"RequestedMarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedWindowState",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2MarkupPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2PortletManagementPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2RegistrationPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2ServiceDescriptionPortType",
";",
"public",
"class",
"BehaviorBackedServiceFactory",
"implements",
"ServiceFactory",
"{",
"private",
"BehaviorRegistry",
"registry",
";",
"private",
"final",
"static",
"String",
"MARKUP",
"=",
"\"markup\"",
";",
"private",
"boolean",
"initialized",
"=",
"false",
";",
"private",
"String",
"wsdl",
"=",
"DEFAULT_WSDL_URL",
";",
"public",
"static",
"final",
"String",
"DEFAULT_WSDL_URL",
"=",
"\"\"",
";",
"private",
"int",
"timeout",
"=",
"DEFAULT_TIMEOUT_MS",
";",
"private",
"boolean",
"failed",
"=",
"false",
";",
"public",
"BehaviorBackedServiceFactory",
"(",
")",
"{",
"this",
"(",
"new",
"BehaviorRegistry",
"(",
")",
")",
";",
"}",
"public",
"BehaviorBackedServiceFactory",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"this",
".",
"registry",
"=",
"registry",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"SimpleMarkupBehavior",
"(",
")",
")",
";",
"}",
"public",
"<",
"T",
">",
"T",
"getService",
"(",
"Class",
"<",
"T",
">",
"serviceClass",
")",
"throws",
"Exception",
"{",
"if",
"(",
"!",
"isAvailable",
"(",
")",
"&&",
"!",
"isFailed",
"(",
")",
")",
"{",
"start",
"(",
")",
";",
"}",
"if",
"(",
"WSRPV2ServiceDescriptionPortType",
".",
"class",
".",
"isAssignableFrom",
"(",
"serviceClass",
")",
")",
"{",
"return",
"(",
"T",
")",
"registry",
".",
"getServiceDescriptionBehavior",
"(",
")",
";",
"}",
"if",
"(",
"WSRPV2MarkupPortType",
".",
"class",
".",
"isAssignableFrom",
"(",
"serviceClass",
")",
")",
"{",
"String",
"requestedMarkupBehavior",
"=",
"RequestedMarkupBehavior",
".",
"getRequestedMarkupBehavior",
"(",
")",
";",
"if",
"(",
"requestedMarkupBehavior",
"==",
"null",
")",
"{",
"requestedMarkupBehavior",
"=",
"MARKUP",
";",
"}",
"return",
"(",
"T",
")",
"registry",
".",
"getMarkupBehaviorFor",
"(",
"requestedMarkupBehavior",
")",
";",
"}",
"if",
"(",
"WSRPV2PortletManagementPortType",
".",
"class",
".",
"isAssignableFrom",
"(",
"serviceClass",
")",
")",
"{",
"return",
"(",
"T",
")",
"registry",
".",
"getPortletManagementBehavior",
"(",
")",
";",
"}",
"if",
"(",
"WSRPV2RegistrationPortType",
".",
"class",
".",
"isAssignableFrom",
"(",
"serviceClass",
")",
")",
"{",
"return",
"(",
"T",
")",
"registry",
".",
"getRegistrationBehavior",
"(",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"ServiceDescriptionService",
"getServiceDescriptionService",
"(",
")",
"throws",
"Exception",
"{",
"return",
"new",
"V2ServiceDescriptionService",
"(",
"getService",
"(",
"WSRPV2ServiceDescriptionPortType",
".",
"class",
")",
")",
";",
"}",
"public",
"MarkupService",
"getMarkupService",
"(",
")",
"throws",
"Exception",
"{",
"return",
"new",
"V2MarkupService",
"(",
"getService",
"(",
"WSRPV2MarkupPortType",
".",
"class",
")",
")",
";",
"}",
"public",
"PortletManagementService",
"getPortletManagementService",
"(",
")",
"throws",
"Exception",
"{",
"return",
"new",
"V2PortletManagementService",
"(",
"getService",
"(",
"WSRPV2PortletManagementPortType",
".",
"class",
")",
")",
";",
"}",
"public",
"RegistrationService",
"getRegistrationService",
"(",
")",
"throws",
"Exception",
"{",
"return",
"new",
"V2RegistrationService",
"(",
"getService",
"(",
"WSRPV2RegistrationPortType",
".",
"class",
")",
")",
";",
"}",
"public",
"Version",
"getWSRPVersion",
"(",
")",
"{",
"return",
"ServiceFactory",
".",
"WSRP2",
";",
"}",
"public",
"boolean",
"refresh",
"(",
"boolean",
"force",
")",
"throws",
"Exception",
"{",
"if",
"(",
"force",
"||",
"(",
"!",
"isAvailable",
"(",
")",
"&&",
"!",
"isFailed",
"(",
")",
")",
")",
"{",
"start",
"(",
")",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"public",
"BehaviorRegistry",
"getRegistry",
"(",
")",
"{",
"return",
"registry",
";",
"}",
"public",
"void",
"setRegistry",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"this",
".",
"registry",
"=",
"registry",
";",
"}",
"public",
"boolean",
"isAvailable",
"(",
")",
"{",
"return",
"initialized",
";",
"}",
"public",
"boolean",
"isFailed",
"(",
")",
"{",
"return",
"failed",
";",
"}",
"public",
"void",
"setFailed",
"(",
"boolean",
"failed",
")",
"{",
"this",
".",
"failed",
"=",
"failed",
";",
"}",
"public",
"void",
"setWSOperationTimeOut",
"(",
"int",
"msBeforeTimeOut",
")",
"{",
"if",
"(",
"msBeforeTimeOut",
"<",
"0",
")",
"{",
"msBeforeTimeOut",
"=",
"DEFAULT_TIMEOUT_MS",
";",
"}",
"timeout",
"=",
"msBeforeTimeOut",
";",
"}",
"public",
"int",
"getWSOperationTimeOut",
"(",
")",
"{",
"return",
"timeout",
";",
"}",
"public",
"void",
"create",
"(",
")",
"throws",
"Exception",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"start",
"(",
")",
"throws",
"Exception",
"{",
"if",
"(",
"failed",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"\"",
")",
";",
"}",
"initialized",
"=",
"true",
";",
"}",
"public",
"void",
"stop",
"(",
")",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"setWsdlDefinitionURL",
"(",
"String",
"wsdlDefinitionURL",
")",
"{",
"wsdl",
"=",
"wsdlDefinitionURL",
";",
"}",
"public",
"String",
"getWsdlDefinitionURL",
"(",
")",
"{",
"return",
"wsdl",
";",
"}",
"public",
"void",
"destroy",
"(",
")",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"private",
"class",
"SimpleMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"SimpleMarkupBehavior",
"(",
")",
"{",
"super",
"(",
"BehaviorBackedServiceFactory",
".",
"this",
".",
"registry",
")",
";",
"registerHandle",
"(",
"MARKUP",
")",
";",
"}",
"@",
"Override",
"protected",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"GetMarkup",
"getMarkup",
")",
"throws",
"UnsupportedWindowState",
",",
"InvalidCookie",
",",
"InvalidSession",
",",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"UnsupportedLocale",
",",
"UnsupportedMode",
",",
"OperationFailed",
",",
"MissingParameters",
",",
"InvalidUserCategory",
",",
"InvalidRegistration",
",",
"UnsupportedMimeType",
"{",
"return",
"MARKUP",
";",
"}",
"}",
"public",
"void",
"enableWSS",
"(",
"boolean",
"enable",
")",
"{",
"}",
"public",
"boolean",
"isWSSEnabled",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"isWSSAvailable",
"(",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
12,336 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"NotYetImplemented",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"net",
".",
"media",
".",
"MediaType",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPTypeFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPUtils",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"EventParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"HandleEventsFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InteractionParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"NavigationalContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletStateChangeRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RuntimeContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"SessionContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UnsupportedWindowState",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UpdateResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2MarkupPortType",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"abstract",
"class",
"MarkupBehavior",
"extends",
"TestProducerBehavior",
"implements",
"WSRPV2MarkupPortType",
"{",
"private",
"List",
"<",
"String",
">",
"handles",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
"3",
")",
";",
"private",
"BehaviorRegistry",
"registry",
";",
"protected",
"MarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"this",
".",
"registry",
"=",
"registry",
";",
"}",
"protected",
"abstract",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"GetMarkup",
"getMarkup",
")",
"throws",
"UnsupportedWindowState",
",",
"InvalidCookie",
",",
"InvalidSession",
",",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"UnsupportedLocale",
",",
"UnsupportedMode",
",",
"OperationFailed",
",",
"MissingParameters",
",",
"InvalidUserCategory",
",",
"InvalidRegistration",
",",
"UnsupportedMimeType",
";",
"public",
"void",
"modifyResponseIfNeeded",
"(",
"MarkupResponse",
"markupResponse",
")",
"{",
"}",
"public",
"List",
"<",
"String",
">",
"getSupportedHandles",
"(",
")",
"{",
"return",
"handles",
";",
"}",
"public",
"PortletDescription",
"getPortletDescriptionFor",
"(",
"String",
"handle",
")",
"{",
"if",
"(",
"handles",
".",
"contains",
"(",
"handle",
")",
")",
"{",
"return",
"createPortletDescription",
"(",
"handle",
",",
"getSuffixFor",
"(",
"handle",
")",
")",
";",
"}",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
"+",
"\"\"",
"+",
"handle",
"+",
"\"'\"",
")",
";",
"}",
"protected",
"String",
"getSuffixFor",
"(",
"String",
"handle",
")",
"{",
"return",
"\"\"",
";",
"}",
"protected",
"void",
"registerHandle",
"(",
"String",
"handle",
")",
"{",
"handles",
".",
"add",
"(",
"handle",
")",
";",
"registry",
".",
"getServiceDescriptionBehavior",
"(",
")",
".",
"addPortletDescription",
"(",
"createPortletDescription",
"(",
"handle",
",",
"getSuffixFor",
"(",
"handle",
")",
")",
")",
";",
"}",
"public",
"void",
"getResource",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"INOUT",
")",
"Holder",
"<",
"PortletContext",
">",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"ResourceParams",
"resourceParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceContext",
">",
"resourceContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"SessionContext",
">",
"sessionContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidCookie",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidSession",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
",",
"UnsupportedLocale",
",",
"UnsupportedMimeType",
",",
"UnsupportedMode",
",",
"UnsupportedWindowState",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"performBlockingInteraction",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"InteractionParams",
"interactionParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"UpdateResponse",
">",
"updateResponse",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"redirectURL\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"redirectURL",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidCookie",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidSession",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"PortletStateChangeRequired",
",",
"ResourceSuspended",
",",
"UnsupportedLocale",
",",
"UnsupportedMimeType",
",",
"UnsupportedMode",
",",
"UnsupportedWindowState",
"{",
"}",
"public",
"void",
"handleEvents",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"eventParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"EventParams",
"eventParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"UpdateResponse",
">",
"updateResponse",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"failedEvents\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"HandleEventsFailed",
">",
">",
"failedEvents",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidCookie",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidSession",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"PortletStateChangeRequired",
",",
"ResourceSuspended",
",",
"UnsupportedLocale",
",",
"UnsupportedMimeType",
",",
"UnsupportedMode",
",",
"UnsupportedWindowState",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"releaseSessions",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"sessionIDs\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"sessionIDs",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"throws",
"AccessDenied",
",",
"InvalidRegistration",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"getMarkup",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"MarkupContext",
">",
"markupContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"SessionContext",
">",
"sessionContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidCookie",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidSession",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"ResourceSuspended",
",",
"UnsupportedLocale",
",",
"UnsupportedMimeType",
",",
"UnsupportedMode",
",",
"UnsupportedWindowState",
"{",
"GetMarkup",
"gm",
"=",
"WSRPTypeFactory",
".",
"createGetMarkup",
"(",
"registrationContext",
",",
"portletContext",
",",
"runtimeContext",
",",
"userContext",
",",
"markupParams",
")",
";",
"NavigationalContext",
"navigationalContext",
"=",
"markupParams",
".",
"getNavigationalContext",
"(",
")",
";",
"String",
"markupString",
"=",
"getMarkupString",
"(",
"WSRPUtils",
".",
"getJSR168PortletModeFromWSRPName",
"(",
"markupParams",
".",
"getMode",
"(",
")",
")",
",",
"WSRPUtils",
".",
"getJSR168WindowStateFromWSRPName",
"(",
"markupParams",
".",
"getWindowState",
"(",
")",
")",
",",
"navigationalContext",
"!=",
"null",
"?",
"navigationalContext",
".",
"getOpaqueValue",
"(",
")",
":",
"null",
",",
"gm",
")",
";",
"markupContext",
".",
"value",
"=",
"WSRPTypeFactory",
".",
"createMarkupContext",
"(",
"MediaType",
".",
"TEXT_HTML",
".",
"getValue",
"(",
")",
",",
"markupString",
",",
"null",
",",
"null",
")",
";",
"markupContext",
".",
"value",
".",
"setRequiresRewriting",
"(",
"Boolean",
".",
"TRUE",
")",
";",
"MarkupResponse",
"markupResponse",
"=",
"WSRPTypeFactory",
".",
"createMarkupResponse",
"(",
"markupContext",
".",
"value",
")",
";",
"modifyResponseIfNeeded",
"(",
"markupResponse",
")",
";",
"markupContext",
".",
"value",
"=",
"markupResponse",
".",
"getMarkupContext",
"(",
")",
";",
"sessionContext",
".",
"value",
"=",
"markupResponse",
".",
"getSessionContext",
"(",
")",
";",
"extensions",
".",
"value",
"=",
"markupResponse",
".",
"getExtensions",
"(",
")",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"initCookie",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"throws",
"AccessDenied",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"return",
"null",
";",
"}",
"}",
"</s>"
] |
12,337 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"NotYetImplemented",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"GetRegistrationLifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Lifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationData",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"SetRegistrationLifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2RegistrationPortType",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"RegistrationBehavior",
"extends",
"TestProducerBehavior",
"implements",
"WSRPV2RegistrationPortType",
"{",
"public",
"static",
"final",
"String",
"REGISTRATION_HANDLE",
"=",
"\"registration\"",
";",
"public",
"void",
"register",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationData",
"registrationData",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"registrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Lifetime",
">",
"scheduledDestruction",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"registrationHandle",
")",
"throws",
"MissingParameters",
",",
"OperationFailed",
",",
"OperationNotSupported",
"{",
"incrementCallCount",
"(",
")",
";",
"registrationHandle",
".",
"value",
"=",
"REGISTRATION_HANDLE",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"deregister",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
")",
"throws",
"InvalidRegistration",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"incrementCallCount",
"(",
")",
";",
"return",
"null",
";",
"}",
"public",
"void",
"modifyRegistration",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationData",
"registrationData",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"registrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Lifetime",
">",
"scheduledDestruction",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"InvalidRegistration",
",",
"MissingParameters",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"public",
"Lifetime",
"getRegistrationLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"partName",
"=",
"\"\"",
")",
"GetRegistrationLifetime",
"getRegistrationLifetime",
")",
"throws",
"AccessDenied",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"Lifetime",
"setRegistrationLifetime",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"partName",
"=",
"\"\"",
")",
"SetRegistrationLifetime",
"setRegistrationLifetime",
")",
"throws",
"AccessDenied",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"}",
"</s>"
] |
12,338 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPConstants",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPTypeFactory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"CookieProtocol",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"EventDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExtensionDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ItemDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelTypes",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PropertyDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ServiceDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2ServiceDescriptionPortType",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"HashSet",
";",
"import",
"java",
".",
"util",
".",
"LinkedList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"public",
"class",
"ServiceDescriptionBehavior",
"extends",
"TestProducerBehavior",
"implements",
"WSRPV2ServiceDescriptionPortType",
"{",
"protected",
"ServiceDescription",
"serviceDescription",
";",
"private",
"static",
"final",
"ServiceDescription",
"DEFAULT_SERVICE_DESCRIPTION",
"=",
"WSRPTypeFactory",
".",
"createServiceDescription",
"(",
"false",
")",
";",
"public",
"static",
"final",
"ServiceDescriptionBehavior",
"DEFAULT",
"=",
"new",
"ServiceDescriptionBehavior",
"(",
")",
";",
"protected",
"List",
"<",
"PortletDescription",
">",
"offeredPortlets",
";",
"private",
"boolean",
"requiresRegistration",
";",
"private",
"CookieProtocol",
"cookieProtocol",
";",
"private",
"ModelDescription",
"registrationProperties",
";",
"public",
"ServiceDescriptionBehavior",
"(",
")",
"{",
"offeredPortlets",
"=",
"new",
"LinkedList",
"<",
"PortletDescription",
">",
"(",
")",
";",
"}",
"public",
"void",
"setRequiresRegistration",
"(",
"boolean",
"requiresRegistration",
")",
"{",
"this",
".",
"requiresRegistration",
"=",
"requiresRegistration",
";",
"}",
"public",
"void",
"setRequiresInitCookie",
"(",
"CookieProtocol",
"requiresInitCookie",
")",
"{",
"this",
".",
"cookieProtocol",
"=",
"requiresInitCookie",
";",
"}",
"public",
"void",
"setServiceDescription",
"(",
"boolean",
"requiresRegistration",
",",
"int",
"numberOfProps",
")",
"{",
"ServiceDescription",
"sd",
"=",
"createServiceDescription",
"(",
"requiresRegistration",
",",
"numberOfProps",
")",
";",
"offeredPortlets",
"=",
"sd",
".",
"getOfferedPortlets",
"(",
")",
";",
"this",
".",
"requiresRegistration",
"=",
"sd",
".",
"isRequiresRegistration",
"(",
")",
";",
"registrationProperties",
"=",
"sd",
".",
"getRegistrationPropertyDescription",
"(",
")",
";",
"}",
"public",
"static",
"ServiceDescription",
"getDefaultServiceDescription",
"(",
")",
"{",
"return",
"DEFAULT_SERVICE_DESCRIPTION",
";",
"}",
"public",
"void",
"addPortletDescription",
"(",
"PortletDescription",
"portletDescription",
")",
"{",
"offeredPortlets",
".",
"add",
"(",
"portletDescription",
")",
";",
"}",
"public",
"Set",
"<",
"String",
">",
"getPortletHandles",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"handles",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
"offeredPortlets",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"PortletDescription",
"description",
":",
"offeredPortlets",
")",
"{",
"handles",
".",
"add",
"(",
"description",
".",
"getPortletHandle",
"(",
")",
")",
";",
"}",
"return",
"handles",
";",
"}",
"public",
"int",
"getPortletNumber",
"(",
")",
"{",
"return",
"offeredPortlets",
".",
"size",
"(",
")",
";",
"}",
"public",
"static",
"ServiceDescription",
"createServiceDescription",
"(",
"boolean",
"requiresRegistration",
",",
"int",
"numberOfProperties",
")",
"{",
"ServiceDescription",
"sd",
"=",
"WSRPTypeFactory",
".",
"createServiceDescription",
"(",
"requiresRegistration",
")",
";",
"if",
"(",
"requiresRegistration",
")",
"{",
"List",
"<",
"PropertyDescription",
">",
"descriptions",
"=",
"new",
"ArrayList",
"<",
"PropertyDescription",
">",
"(",
"numberOfProperties",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfProperties",
";",
"i",
"++",
")",
"{",
"descriptions",
".",
"add",
"(",
"WSRPTypeFactory",
".",
"createPropertyDescription",
"(",
"\"prop\"",
"+",
"i",
",",
"WSRPConstants",
".",
"XSD_STRING",
")",
")",
";",
"}",
"sd",
".",
"setRegistrationPropertyDescription",
"(",
"WSRPTypeFactory",
".",
"createModelDescription",
"(",
"descriptions",
")",
")",
";",
"}",
"return",
"sd",
";",
"}",
"public",
"void",
"getServiceDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"portletHandles",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Boolean",
">",
"requiresRegistration",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"PortletDescription",
">",
">",
"offeredPortlets",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"userCategoryDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ExtensionDescription",
">",
">",
"extensionDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"customWindowStateDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"customModeDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"CookieProtocol",
">",
"requiresInitCookie",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ModelDescription",
">",
"registrationPropertyDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"locales\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"locales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"EventDescription",
">",
">",
"eventDescriptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"schemaType\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ModelTypes",
">",
"schemaType",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"supportedOptions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ExportDescription",
">",
"exportDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Boolean",
">",
"mayReturnRegistrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"InvalidRegistration",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"ResourceSuspended",
"{",
"incrementCallCount",
"(",
")",
";",
"offeredPortlets",
".",
"value",
"=",
"this",
".",
"offeredPortlets",
";",
"requiresRegistration",
".",
"value",
"=",
"this",
".",
"requiresRegistration",
";",
"requiresInitCookie",
".",
"value",
"=",
"this",
".",
"cookieProtocol",
";",
"registrationPropertyDescription",
".",
"value",
"=",
"registrationProperties",
";",
"}",
"}",
"</s>"
] |
12,339 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1ExceptionFactory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"public",
"class",
"BehaviorRegistry",
"{",
"private",
"final",
"Map",
"<",
"String",
",",
"MarkupBehavior",
">",
"behaviors",
"=",
"new",
"HashMap",
"<",
"String",
",",
"MarkupBehavior",
">",
"(",
")",
";",
"private",
"PortletManagementBehavior",
"portletManagementBehavior",
";",
"private",
"ServiceDescriptionBehavior",
"serviceDescriptionBehavior",
";",
"private",
"RegistrationBehavior",
"registrationBehavior",
";",
"public",
"ServiceDescriptionBehavior",
"getServiceDescriptionBehavior",
"(",
")",
"{",
"if",
"(",
"serviceDescriptionBehavior",
"==",
"null",
")",
"{",
"return",
"ServiceDescriptionBehavior",
".",
"DEFAULT",
";",
"}",
"return",
"serviceDescriptionBehavior",
";",
"}",
"public",
"void",
"clear",
"(",
")",
"{",
"behaviors",
".",
"clear",
"(",
")",
";",
"}",
"public",
"MarkupBehavior",
"getMarkupBehaviorFor",
"(",
"String",
"handle",
")",
"throws",
"V1InvalidHandle",
"{",
"if",
"(",
"behaviors",
".",
"containsKey",
"(",
"handle",
")",
")",
"{",
"return",
"behaviors",
".",
"get",
"(",
"handle",
")",
";",
"}",
"throw",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1InvalidHandle",
".",
"class",
",",
"\"\"",
"+",
"handle",
"+",
"\"'\"",
",",
"null",
")",
";",
"}",
"public",
"void",
"registerMarkupBehavior",
"(",
"MarkupBehavior",
"behavior",
")",
"{",
"for",
"(",
"String",
"handle",
":",
"behavior",
".",
"getSupportedHandles",
"(",
")",
")",
"{",
"MarkupBehavior",
"existing",
"=",
"behaviors",
".",
"get",
"(",
"handle",
")",
";",
"if",
"(",
"existing",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"behavior",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
"+",
"\"\"",
"+",
"handle",
"+",
"\"\"",
"+",
"existing",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
";",
"}",
"behaviors",
".",
"put",
"(",
"handle",
",",
"behavior",
")",
";",
"}",
"}",
"public",
"PortletManagementBehavior",
"getPortletManagementBehavior",
"(",
")",
"{",
"return",
"portletManagementBehavior",
";",
"}",
"public",
"void",
"setPortletManagementBehavior",
"(",
"PortletManagementBehavior",
"portletManagementBehavior",
")",
"{",
"this",
".",
"portletManagementBehavior",
"=",
"portletManagementBehavior",
";",
"}",
"public",
"void",
"setServiceDescriptionBehavior",
"(",
"ServiceDescriptionBehavior",
"serviceDescriptionBehavior",
")",
"{",
"this",
".",
"serviceDescriptionBehavior",
"=",
"serviceDescriptionBehavior",
";",
"}",
"public",
"RegistrationBehavior",
"getRegistrationBehavior",
"(",
")",
"{",
"return",
"registrationBehavior",
";",
"}",
"public",
"void",
"setRegistrationBehavior",
"(",
"RegistrationBehavior",
"registrationBehavior",
")",
"{",
"this",
".",
"registrationBehavior",
"=",
"registrationBehavior",
";",
"}",
"}",
"</s>"
] |
12,340 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1ExceptionFactory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1CookieProtocol",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1DestroyFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InteractionParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ItemDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MarkupContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MarkupParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletStateChangeRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Property",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PropertyList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationData",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ResetProperty",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RuntimeContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1SessionContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedWindowState",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UpdateResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UserContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1MarkupPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1PortletManagementPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1RegistrationPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1ServiceDescriptionPortType",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"TestWSRPProducerImpl",
"implements",
"TestWSRPProducer",
",",
"WSRPV1MarkupPortType",
",",
"WSRPV1PortletManagementPortType",
",",
"WSRPV1RegistrationPortType",
",",
"WSRPV1ServiceDescriptionPortType",
"{",
"private",
"int",
"sessionExpirationTime",
"=",
"600",
";",
"private",
"V1CookieProtocol",
"requiresInitCookie",
"=",
"V1CookieProtocol",
".",
"NONE",
";",
"private",
"BehaviorRegistry",
"behaviorRegistry",
"=",
"new",
"BehaviorRegistry",
"(",
")",
";",
"public",
"static",
"final",
"String",
"USER_COOKIE",
"=",
"\"cookie\"",
";",
"private",
"String",
"currentMarkupBehaviorHandle",
";",
"private",
"boolean",
"strict",
"=",
"true",
";",
"public",
"TestWSRPProducerImpl",
"(",
")",
"{",
"reset",
"(",
")",
";",
"}",
"public",
"BehaviorRegistry",
"getBehaviorRegistry",
"(",
")",
"{",
"return",
"behaviorRegistry",
";",
"}",
"public",
"void",
"setCurrentMarkupBehaviorHandle",
"(",
"String",
"handle",
")",
"{",
"currentMarkupBehaviorHandle",
"=",
"handle",
";",
"}",
"public",
"void",
"reset",
"(",
")",
"{",
"requiresInitCookie",
"=",
"null",
";",
"currentMarkupBehaviorHandle",
"=",
"null",
";",
"behaviorRegistry",
".",
"clear",
"(",
")",
";",
"}",
"private",
"MarkupBehavior",
"getMarkupBehaviorFor",
"(",
"String",
"portletHandle",
")",
"throws",
"V1InvalidHandle",
"{",
"return",
"behaviorRegistry",
".",
"getMarkupBehaviorFor",
"(",
"portletHandle",
")",
";",
"}",
"private",
"ServiceDescriptionBehavior",
"getServiceDescriptionBehavior",
"(",
")",
"{",
"return",
"behaviorRegistry",
".",
"getServiceDescriptionBehavior",
"(",
")",
";",
"}",
"public",
"PortletManagementBehavior",
"getPortletManagementBehavior",
"(",
")",
"{",
"return",
"behaviorRegistry",
".",
"getPortletManagementBehavior",
"(",
")",
";",
"}",
"public",
"void",
"getServiceDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"Boolean",
">",
"requiresRegistration",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1PortletDescription",
">",
">",
"offeredPortlets",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"userCategoryDescriptions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"customUserProfileItemDescriptions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"customWindowStateDescriptions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"customModeDescriptions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1CookieProtocol",
">",
"requiresInitCookie",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1ModelDescription",
">",
"registrationPropertyDescription",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"locales\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"locales",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1InvalidRegistration",
",",
"V1OperationFailed",
"{",
"getServiceDescriptionBehavior",
"(",
")",
".",
"getServiceDescription",
"(",
"registrationContext",
",",
"desiredLocales",
",",
"requiresRegistration",
",",
"offeredPortlets",
",",
"userCategoryDescriptions",
",",
"customUserProfileItemDescriptions",
",",
"customWindowStateDescriptions",
",",
"customModeDescriptions",
",",
"requiresInitCookie",
",",
"registrationPropertyDescription",
",",
"locales",
",",
"resourceList",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"performBlockingInteraction",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1InteractionParams",
"interactionParams",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1UpdateResponse",
">",
"updateResponse",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"redirectURL\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"String",
">",
"redirectURL",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1UnsupportedMimeType",
",",
"V1UnsupportedMode",
",",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1MissingParameters",
",",
"V1UnsupportedLocale",
",",
"V1InconsistentParameters",
",",
"V1PortletStateChangeRequired",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"getMarkupBehaviorFor",
"(",
"portletContext",
".",
"getPortletHandle",
"(",
")",
")",
".",
"performBlockingInteraction",
"(",
"registrationContext",
",",
"portletContext",
",",
"runtimeContext",
",",
"userContext",
",",
"markupParams",
",",
"interactionParams",
",",
"updateResponse",
",",
"redirectURL",
",",
"extensions",
")",
";",
"}",
"public",
"List",
"<",
"V1Extension",
">",
"releaseSessions",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"sessionIDs\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"sessionIDs",
")",
"throws",
"V1MissingParameters",
",",
"V1InvalidRegistration",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"return",
"null",
";",
"}",
"public",
"void",
"getMarkup",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1MarkupContext",
">",
"markupContext",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1SessionContext",
">",
"sessionContext",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1UnsupportedMimeType",
",",
"V1UnsupportedMode",
",",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1MissingParameters",
",",
"V1UnsupportedLocale",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"getMarkupBehaviorFor",
"(",
"portletContext",
".",
"getPortletHandle",
"(",
")",
")",
".",
"getMarkup",
"(",
"registrationContext",
",",
"portletContext",
",",
"runtimeContext",
",",
"userContext",
",",
"markupParams",
",",
"markupContext",
",",
"sessionContext",
",",
"extensions",
")",
";",
"}",
"public",
"List",
"<",
"V1Extension",
">",
"initCookie",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
")",
"throws",
"V1InvalidRegistration",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"if",
"(",
"requiresInitCookie",
"==",
"null",
"||",
"V1CookieProtocol",
".",
"NONE",
".",
"equals",
"(",
"requiresInitCookie",
")",
")",
"{",
"throw",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1OperationFailed",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"try",
"{",
"return",
"getMarkupBehaviorFor",
"(",
"currentMarkupBehaviorHandle",
")",
".",
"initCookie",
"(",
"registrationContext",
")",
";",
"}",
"catch",
"(",
"V1InvalidHandle",
"invalidHandle",
")",
"{",
"throw",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1OperationFailed",
".",
"class",
",",
"\"\"",
",",
"invalidHandle",
")",
";",
"}",
"}",
"public",
"void",
"register",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"consumerName\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"String",
"consumerName",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"String",
"consumerAgent",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"boolean",
"methodGetSupported",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"consumerModes",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"consumerWindowStates",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"consumerUserScopes",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"customUserProfileData",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"V1Property",
">",
"registrationProperties",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"INOUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"String",
">",
"registrationHandle",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"registrationState",
")",
"throws",
"V1MissingParameters",
",",
"V1OperationFailed",
"{",
"registrationHandle",
".",
"value",
"=",
"\"registration\"",
";",
"}",
"public",
"void",
"modifyRegistration",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationData",
"registrationData",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"registrationState",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InvalidRegistration",
",",
"V1OperationFailed",
"{",
"}",
"public",
"void",
"deregister",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"String",
"registrationHandle",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"byte",
"[",
"]",
"registrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"INOUT",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1InvalidRegistration",
",",
"V1OperationFailed",
"{",
"}",
"public",
"void",
"getPortletPropertyDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1ModelDescription",
">",
"modelDescription",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"getPortletPropertyDescription",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"desiredLocales",
",",
"modelDescription",
",",
"resourceList",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"setPortletProperties",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"propertyList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PropertyList",
"propertyList",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"String",
">",
"portletHandle",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"portletState\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"portletState",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"setPortletProperties",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"propertyList",
",",
"portletHandle",
",",
"portletState",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"clonePortlet",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"String",
">",
"portletHandle",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"portletState\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"portletState",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"clonePortlet",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"portletHandle",
",",
"portletState",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"getPortletDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1PortletDescription",
">",
"portletDescription",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"getPortletDescription",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"desiredLocales",
",",
"portletDescription",
",",
"resourceList",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"getPortletProperties",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"names\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"names",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"properties\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Property",
">",
">",
"properties",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ResetProperty",
">",
">",
"resetProperties",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"getPortletProperties",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"names",
",",
"properties",
",",
"resetProperties",
",",
"extensions",
")",
";",
"}",
"public",
"void",
"destroyPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"portletHandles",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1DestroyFailed",
">",
">",
"destroyFailed",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InconsistentParameters",
",",
"V1InvalidRegistration",
",",
"V1OperationFailed",
"{",
"getPortletManagementBehavior",
"(",
")",
".",
"destroyPortlets",
"(",
"registrationContext",
",",
"portletHandles",
",",
"destroyFailed",
",",
"extensions",
")",
";",
"}",
"public",
"V1CookieProtocol",
"getRequiresInitCookie",
"(",
")",
"{",
"return",
"requiresInitCookie",
";",
"}",
"public",
"void",
"setRequiresInitCookie",
"(",
"String",
"cookieProtocolAsString",
")",
"{",
"V1CookieProtocol",
"protocol",
"=",
"V1CookieProtocol",
".",
"fromValue",
"(",
"cookieProtocolAsString",
")",
";",
"this",
".",
"requiresInitCookie",
"=",
"protocol",
";",
"getServiceDescriptionBehavior",
"(",
")",
".",
"setRequiresInitCookie",
"(",
"requiresInitCookie",
")",
";",
"}",
"public",
"int",
"getSessionExpirationTime",
"(",
")",
"{",
"return",
"sessionExpirationTime",
";",
"}",
"public",
"void",
"setSessionExpirationTime",
"(",
"int",
"sessionExpirationTime",
")",
"{",
"this",
".",
"sessionExpirationTime",
"=",
"sessionExpirationTime",
";",
"}",
"public",
"void",
"usingStrictModeChangedTo",
"(",
"boolean",
"strictMode",
")",
"{",
"strict",
"=",
"strictMode",
";",
"}",
"}",
"</s>"
] |
12,341 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1DestroyFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Property",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PropertyList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ResetProperty",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UserContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1PortletManagementPortType",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"PortletManagementBehavior",
"extends",
"TestProducerBehavior",
"implements",
"WSRPV1PortletManagementPortType",
"{",
"public",
"void",
"getPortletDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"V1PortletDescription",
">",
"portletDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"V1ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1AccessDenied",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1MissingParameters",
",",
"V1OperationFailed",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"public",
"void",
"clonePortlet",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"portletHandle",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"portletState\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"portletState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1AccessDenied",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1MissingParameters",
",",
"V1OperationFailed",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"public",
"void",
"destroyPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"portletHandles",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"V1DestroyFailed",
">",
">",
"destroyFailed",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1InconsistentParameters",
",",
"V1InvalidRegistration",
",",
"V1MissingParameters",
",",
"V1OperationFailed",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"public",
"void",
"setPortletProperties",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"propertyList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PropertyList",
"propertyList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"portletHandle",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"portletState\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"portletState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1AccessDenied",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1MissingParameters",
",",
"V1OperationFailed",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"public",
"void",
"getPortletProperties",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"names\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"names",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"properties\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"V1Property",
">",
">",
"properties",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"V1ResetProperty",
">",
">",
"resetProperties",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1AccessDenied",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1MissingParameters",
",",
"V1OperationFailed",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"public",
"void",
"getPortletPropertyDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"V1ModelDescription",
">",
"modelDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"V1ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1AccessDenied",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1MissingParameters",
",",
"V1OperationFailed",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"}",
"</s>"
] |
12,342 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"ServiceDescriptionBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletDescription",
";",
"public",
"class",
"BasicServiceDescriptionBehavior",
"extends",
"ServiceDescriptionBehavior",
"{",
"public",
"BasicServiceDescriptionBehavior",
"(",
")",
"{",
"V1PortletDescription",
"pd1",
"=",
"createPortletDescription",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"\"\"",
")",
";",
"V1PortletDescription",
"pd2",
"=",
"createPortletDescription",
"(",
"SessionMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"\"2\"",
")",
";",
"offeredPortlets",
".",
"add",
"(",
"pd1",
")",
";",
"offeredPortlets",
".",
"add",
"(",
"pd2",
")",
";",
"}",
"}",
"</s>"
] |
12,343 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1TypeFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InteractionParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MarkupParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MarkupResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletStateChangeRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RuntimeContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1SessionContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedWindowState",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UpdateResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"SessionMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PORTLET_HANDLE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"SESSION_ID",
"=",
"\"sessionID\"",
";",
"public",
"static",
"final",
"String",
"NS",
"=",
"\"ns2\"",
";",
"private",
"int",
"count",
"=",
"0",
";",
"private",
"String",
"sessionId",
";",
"public",
"SessionMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"registerHandle",
"(",
"PORTLET_HANDLE",
")",
";",
"}",
"@",
"Override",
"protected",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"V1GetMarkup",
"getMarkup",
")",
"throws",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1AccessDenied",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1UnsupportedLocale",
",",
"V1UnsupportedMode",
",",
"V1OperationFailed",
",",
"V1MissingParameters",
",",
"V1InvalidUserCategory",
",",
"V1InvalidRegistration",
",",
"V1UnsupportedMimeType",
"{",
"StringBuffer",
"markupString",
"=",
"new",
"StringBuffer",
"(",
"\"portlet2:\"",
")",
";",
"sessionId",
"=",
"getMarkup",
".",
"getRuntimeContext",
"(",
")",
".",
"getSessionID",
"(",
")",
";",
"if",
"(",
"SESSION_ID",
".",
"equals",
"(",
"sessionId",
")",
")",
"{",
"count",
"++",
";",
"}",
"markupString",
".",
"append",
"(",
"count",
")",
".",
"append",
"(",
"\":\"",
")",
";",
"markupString",
".",
"append",
"(",
"mode",
")",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"windowState",
")",
";",
"if",
"(",
"navigationalState",
"!=",
"null",
")",
"{",
"markupString",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"navigationalState",
")",
";",
"}",
"return",
"markupString",
".",
"toString",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"performBlockingInteraction",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1InteractionParams",
"interactionParams",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1UpdateResponse",
">",
"updateResponse",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"redirectURL\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"String",
">",
"redirectURL",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1UnsupportedMimeType",
",",
"V1UnsupportedMode",
",",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1MissingParameters",
",",
"V1UnsupportedLocale",
",",
"V1InconsistentParameters",
",",
"V1PortletStateChangeRequired",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"V1UpdateResponse",
"ur",
"=",
"WSRP1TypeFactory",
".",
"createUpdateResponse",
"(",
")",
";",
"ur",
".",
"setNavigationalState",
"(",
"NS",
")",
";",
"updateResponse",
".",
"value",
"=",
"ur",
";",
"}",
"public",
"void",
"modifyResponseIfNeeded",
"(",
"V1MarkupResponse",
"markupResponse",
")",
"{",
"if",
"(",
"count",
"==",
"0",
"||",
"SESSION_ID",
".",
"equals",
"(",
"sessionId",
")",
")",
"{",
"V1SessionContext",
"sessionContext",
"=",
"WSRP1TypeFactory",
".",
"createSessionContext",
"(",
"SESSION_ID",
",",
"30",
")",
";",
"markupResponse",
".",
"setSessionContext",
"(",
"sessionContext",
")",
";",
"}",
"}",
"protected",
"String",
"getSuffixFor",
"(",
"String",
"handle",
")",
"{",
"return",
"\"2\"",
";",
"}",
"}",
"</s>"
] |
12,344 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"interop",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"ServiceDescriptionBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1LocalizedString",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletDescription",
";",
"public",
"class",
"LiferayServiceDescriptionBehavior",
"extends",
"ServiceDescriptionBehavior",
"{",
"public",
"LiferayServiceDescriptionBehavior",
"(",
")",
"{",
"V1PortletDescription",
"pd",
"=",
"createPortletDescription",
"(",
"\"98\"",
",",
"null",
")",
";",
"pd",
".",
"getMarkupTypes",
"(",
")",
".",
"get",
"(",
"0",
")",
".",
"getLocales",
"(",
")",
".",
"set",
"(",
"0",
",",
"\"en_US\"",
")",
";",
"V1LocalizedString",
"locString",
"=",
"pd",
".",
"getShortTitle",
"(",
")",
";",
"pd",
".",
"setGroupID",
"(",
"\"98\"",
")",
";",
"String",
"lang",
"=",
"\"English\"",
";",
"locString",
".",
"setLang",
"(",
"lang",
")",
";",
"locString",
".",
"setValue",
"(",
"\"\"",
")",
";",
"locString",
"=",
"pd",
".",
"getTitle",
"(",
")",
";",
"locString",
".",
"setLang",
"(",
"lang",
")",
";",
"locString",
".",
"setValue",
"(",
"\"\"",
")",
";",
"V1PortletDescription",
"pd2",
"=",
"createPortletDescription",
"(",
"\"99\"",
",",
"null",
")",
";",
"pd",
".",
"getMarkupTypes",
"(",
")",
".",
"get",
"(",
"0",
")",
".",
"getLocales",
"(",
")",
".",
"set",
"(",
"0",
",",
"\"en_US\"",
")",
";",
"locString",
"=",
"pd",
".",
"getShortTitle",
"(",
")",
";",
"locString",
".",
"setLang",
"(",
"null",
")",
";",
"offeredPortlets",
".",
"add",
"(",
"pd",
")",
";",
"offeredPortlets",
".",
"add",
"(",
"pd2",
")",
";",
"}",
"}",
"</s>"
] |
12,345 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1ExceptionFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"InitCookieNotRequiredMarkupBehavior",
"extends",
"InitCookieMarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"INIT_COOKIE_NOT_REQUIRED_HANDLE",
"=",
"\"\"",
";",
"public",
"InitCookieNotRequiredMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"}",
"protected",
"void",
"initPortletHandle",
"(",
")",
"{",
"portletHandle",
"=",
"INIT_COOKIE_NOT_REQUIRED_HANDLE",
";",
"}",
"@",
"Override",
"protected",
"String",
"getMarkupString",
"(",
"String",
"handle",
")",
"{",
"return",
"handle",
";",
"}",
"@",
"Override",
"public",
"List",
"<",
"V1Extension",
">",
"initCookie",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
")",
"throws",
"V1InvalidRegistration",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"super",
".",
"initCookie",
"(",
"registrationContext",
")",
";",
"throw",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1OperationFailed",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"}",
"</s>"
] |
12,346 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1ExceptionFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"abstract",
"class",
"InitCookieMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"protected",
"String",
"portletHandle",
";",
"protected",
"int",
"initCookieCallCount",
";",
"private",
"boolean",
"initCookieCalled",
";",
"public",
"InitCookieMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"initPortletHandle",
"(",
")",
";",
"registerHandle",
"(",
"portletHandle",
")",
";",
"}",
"protected",
"abstract",
"void",
"initPortletHandle",
"(",
")",
";",
"protected",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"V1GetMarkup",
"getMarkup",
")",
"throws",
"V1OperationFailed",
",",
"V1InvalidCookie",
"{",
"if",
"(",
"!",
"initCookieCalled",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"\"",
")",
";",
"}",
"String",
"handle",
"=",
"getMarkup",
".",
"getPortletContext",
"(",
")",
".",
"getPortletHandle",
"(",
")",
";",
"if",
"(",
"portletHandle",
".",
"equals",
"(",
"handle",
")",
")",
"{",
"return",
"getMarkupString",
"(",
"handle",
")",
";",
"}",
"throw",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1OperationFailed",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"protected",
"String",
"getMarkupString",
"(",
"String",
"handle",
")",
"throws",
"V1InvalidCookie",
",",
"V1OperationFailed",
"{",
"switch",
"(",
"callCount",
"++",
")",
"{",
"case",
"0",
":",
"throw",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1InvalidCookie",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"case",
"1",
":",
"return",
"handle",
";",
"default",
":",
"throw",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1OperationFailed",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"}",
"@",
"Override",
"public",
"List",
"<",
"V1Extension",
">",
"initCookie",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
")",
"throws",
"V1InvalidRegistration",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"initCookieCalled",
"=",
"true",
";",
"initCookieCallCount",
"++",
";",
"return",
"null",
";",
"}",
"public",
"int",
"getInitCookieCallCount",
"(",
")",
"{",
"return",
"initCookieCallCount",
";",
"}",
"}",
"</s>"
] |
12,347 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"ServiceDescriptionBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1CookieProtocol",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ItemDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ResourceList",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"GroupedPortletsServiceDescriptionBehavior",
"extends",
"ServiceDescriptionBehavior",
"{",
"public",
"GroupedPortletsServiceDescriptionBehavior",
"(",
"List",
"<",
"V1PortletDescription",
">",
"offeredPortlets",
")",
"{",
"this",
".",
"offeredPortlets",
"=",
"offeredPortlets",
";",
"}",
"@",
"Override",
"public",
"void",
"getServiceDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"Boolean",
">",
"requiresRegistration",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1PortletDescription",
">",
">",
"offeredPortlets",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"userCategoryDescriptions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"customUserProfileItemDescriptions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"customWindowStateDescriptions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"customModeDescriptions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1CookieProtocol",
">",
"requiresInitCookie",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1ModelDescription",
">",
"registrationPropertyDescription",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"locales\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"locales",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1InvalidRegistration",
",",
"V1OperationFailed",
"{",
"super",
".",
"getServiceDescription",
"(",
"registrationContext",
",",
"desiredLocales",
",",
"requiresRegistration",
",",
"offeredPortlets",
",",
"userCategoryDescriptions",
",",
"customUserProfileItemDescriptions",
",",
"customWindowStateDescriptions",
",",
"customModeDescriptions",
",",
"requiresInitCookie",
",",
"registrationPropertyDescription",
",",
"locales",
",",
"resourceList",
",",
"extensions",
")",
";",
"List",
"<",
"V1PortletDescription",
">",
"portletDescriptions",
"=",
"offeredPortlets",
".",
"value",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"portletDescriptions",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"portletDescriptions",
".",
"get",
"(",
"i",
")",
".",
"setGroupID",
"(",
"\"group\"",
"+",
"i",
"%",
"3",
")",
";",
"}",
"}",
"}",
"</s>"
] |
12,348 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedWindowState",
";",
"public",
"class",
"EmptyMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PORTLET_HANDLE",
"=",
"\"EmptyMarkup\"",
";",
"public",
"EmptyMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"registerHandle",
"(",
"PORTLET_HANDLE",
")",
";",
"}",
"@",
"Override",
"protected",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"V1GetMarkup",
"getMarkup",
")",
"throws",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1AccessDenied",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1UnsupportedLocale",
",",
"V1UnsupportedMode",
",",
"V1OperationFailed",
",",
"V1MissingParameters",
",",
"V1InvalidUserCategory",
",",
"V1InvalidRegistration",
",",
"V1UnsupportedMimeType",
"{",
"return",
"\"\"",
";",
"}",
"}",
"</s>"
] |
12,349 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1ExceptionFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"DestroyClonesPortletManagementBehavior",
"extends",
"BasicPortletManagementBehavior",
"{",
"public",
"DestroyClonesPortletManagementBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"getPortletDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1PortletDescription",
">",
"portletDescription",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"if",
"(",
"getCallCount",
"(",
")",
"==",
"0",
")",
"{",
"incrementCallCount",
"(",
")",
";",
"super",
".",
"getPortletDescription",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"desiredLocales",
",",
"portletDescription",
",",
"resourceList",
",",
"extensions",
")",
";",
"}",
"else",
"{",
"throw",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1InvalidHandle",
".",
"class",
",",
"\"\"",
"+",
"portletContext",
".",
"getPortletHandle",
"(",
")",
",",
"null",
")",
";",
"}",
"}",
"}",
"</s>"
] |
12,350 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPConstants",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1TypeFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InteractionParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MarkupParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MarkupResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletStateChangeRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RuntimeContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedWindowState",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UpdateResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"BasicMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PORTLET_HANDLE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"NS",
"=",
"\"ns1\"",
";",
"public",
"BasicMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"registerHandle",
"(",
"PORTLET_HANDLE",
")",
";",
"}",
"@",
"Override",
"protected",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"V1GetMarkup",
"getMarkup",
")",
"throws",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1AccessDenied",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1UnsupportedLocale",
",",
"V1UnsupportedMode",
",",
"V1OperationFailed",
",",
"V1MissingParameters",
",",
"V1InvalidUserCategory",
",",
"V1InvalidRegistration",
",",
"V1UnsupportedMimeType",
"{",
"StringBuffer",
"markupString",
"=",
"new",
"StringBuffer",
"(",
"\"portlet1:\"",
")",
";",
"markupString",
".",
"append",
"(",
"mode",
")",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"windowState",
")",
";",
"if",
"(",
"navigationalState",
"!=",
"null",
")",
"{",
"markupString",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"navigationalState",
")",
";",
"}",
"return",
"markupString",
".",
"toString",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"performBlockingInteraction",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1InteractionParams",
"interactionParams",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1UpdateResponse",
">",
"updateResponse",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"redirectURL\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"String",
">",
"redirectURL",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1UnsupportedMimeType",
",",
"V1UnsupportedMode",
",",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1MissingParameters",
",",
"V1UnsupportedLocale",
",",
"V1InconsistentParameters",
",",
"V1PortletStateChangeRequired",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"V1UpdateResponse",
"ur",
"=",
"WSRP1TypeFactory",
".",
"createUpdateResponse",
"(",
")",
";",
"ur",
".",
"setNavigationalState",
"(",
"NS",
")",
";",
"updateResponse",
".",
"value",
"=",
"ur",
";",
"}",
"public",
"void",
"modifyResponseIfNeeded",
"(",
"V1MarkupResponse",
"markupResponse",
")",
"{",
"markupResponse",
".",
"getMarkupContext",
"(",
")",
".",
"setCacheControl",
"(",
"WSRP1TypeFactory",
".",
"createCacheControl",
"(",
"15",
",",
"WSRPConstants",
".",
"CACHE_PER_USER",
")",
")",
";",
"}",
"}",
"</s>"
] |
12,351 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"handler",
".",
"RequestHeaderClientHandler",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"handler",
".",
"MockSOAPMessage",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"handler",
".",
"MockSOAPMessageContext",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"javax",
".",
"xml",
".",
"soap",
".",
"MimeHeaders",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"handler",
".",
"soap",
".",
"SOAPMessageContext",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"PerUserInitCookieMarkupBehavior",
"extends",
"InitCookieMarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PER_USER_INIT_COOKIE_HANDLE",
"=",
"\"\"",
";",
"public",
"PerUserInitCookieMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"}",
"protected",
"void",
"initPortletHandle",
"(",
")",
"{",
"portletHandle",
"=",
"PER_USER_INIT_COOKIE_HANDLE",
";",
"}",
"@",
"Override",
"public",
"List",
"<",
"V1Extension",
">",
"initCookie",
"(",
"V1RegistrationContext",
"registrationContext",
")",
"throws",
"V1InvalidRegistration",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"MockSOAPMessage",
"message",
"=",
"new",
"MockSOAPMessage",
"(",
")",
";",
"SOAPMessageContext",
"msgContext",
"=",
"MockSOAPMessageContext",
".",
"createMessageContext",
"(",
"message",
",",
"getClass",
"(",
")",
".",
"getClassLoader",
"(",
")",
")",
";",
"MimeHeaders",
"headers",
"=",
"new",
"MimeHeaders",
"(",
")",
";",
"headers",
".",
"setHeader",
"(",
"\"Set-Cookie\"",
",",
"\"name=value\"",
")",
";",
"message",
".",
"setMimeHeaders",
"(",
"headers",
")",
";",
"RequestHeaderClientHandler",
"rhch",
"=",
"new",
"RequestHeaderClientHandler",
"(",
")",
";",
"rhch",
".",
"handleResponse",
"(",
"msgContext",
")",
";",
"return",
"super",
".",
"initCookie",
"(",
"registrationContext",
")",
";",
"}",
"}",
"</s>"
] |
12,352 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedWindowState",
";",
"public",
"class",
"NullMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PORTLET_HANDLE",
"=",
"\"NullMarkup\"",
";",
"public",
"NullMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"registerHandle",
"(",
"PORTLET_HANDLE",
")",
";",
"}",
"@",
"Override",
"protected",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"V1GetMarkup",
"getMarkup",
")",
"throws",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1AccessDenied",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1UnsupportedLocale",
",",
"V1UnsupportedMode",
",",
"V1OperationFailed",
",",
"V1MissingParameters",
",",
"V1InvalidUserCategory",
",",
"V1InvalidRegistration",
",",
"V1UnsupportedMimeType",
"{",
"return",
"null",
";",
"}",
"}",
"</s>"
] |
12,353 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedWindowState",
";",
"public",
"class",
"ResourceMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PORTLET_HANDLE",
"=",
"\"resource\"",
";",
"public",
"ResourceMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"registerHandle",
"(",
"PORTLET_HANDLE",
")",
";",
"}",
"@",
"Override",
"protected",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"V1GetMarkup",
"getMarkup",
")",
"throws",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1AccessDenied",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1UnsupportedLocale",
",",
"V1UnsupportedMode",
",",
"V1OperationFailed",
",",
"V1MissingParameters",
",",
"V1InvalidUserCategory",
",",
"V1InvalidRegistration",
",",
"V1UnsupportedMimeType",
"{",
"return",
"\"\"",
"+",
"\"\"",
";",
"}",
"}",
"</s>"
] |
12,354 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"util",
".",
"ParameterValidation",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1ExceptionFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1TypeFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"MarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"PortletManagementBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1DestroyFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Property",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PropertyList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ResetProperty",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"BasicPortletManagementBehavior",
"extends",
"PortletManagementBehavior",
"{",
"private",
"static",
"final",
"String",
"CLONE_SUFFIX",
"=",
"\"_clone\"",
";",
"public",
"static",
"final",
"String",
"PROPERTY_NAME",
"=",
"\"prop1\"",
";",
"public",
"static",
"final",
"String",
"PROPERTY_VALUE",
"=",
"\"value1\"",
";",
"public",
"static",
"final",
"String",
"PROPERTY_NEW_VALUE",
"=",
"\"value2\"",
";",
"public",
"static",
"final",
"String",
"CLONED_HANDLE",
"=",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
"+",
"CLONE_SUFFIX",
";",
"public",
"static",
"final",
"String",
"CANNOT_BOTH_SET_AND_RESET_A_PROPERTY_AT_THE_SAME_TIME",
"=",
"\"\"",
";",
"private",
"BehaviorRegistry",
"registry",
";",
"private",
"String",
"propValue",
"=",
"PROPERTY_VALUE",
";",
"public",
"BasicPortletManagementBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
")",
";",
"this",
".",
"registry",
"=",
"registry",
";",
"}",
"@",
"Override",
"public",
"void",
"clonePortlet",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"String",
">",
"portletHandle",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"portletState\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"portletState",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"String",
"handle",
"=",
"getHandleFrom",
"(",
"portletContext",
",",
"\"\"",
")",
";",
"if",
"(",
"!",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
".",
"equals",
"(",
"handle",
")",
")",
"{",
"throw",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1OperationFailed",
".",
"class",
",",
"\"\"",
"+",
"handle",
"+",
"\"'\"",
",",
"null",
")",
";",
"}",
"portletHandle",
".",
"value",
"=",
"CLONED_HANDLE",
";",
"}",
"@",
"Override",
"public",
"void",
"getPortletDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1PortletDescription",
">",
"portletDescription",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"super",
".",
"getPortletDescription",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"desiredLocales",
",",
"portletDescription",
",",
"resourceList",
",",
"extensions",
")",
";",
"String",
"handle",
"=",
"getHandleFrom",
"(",
"portletContext",
",",
"\"\"",
")",
";",
"int",
"index",
"=",
"handle",
".",
"indexOf",
"(",
"CLONE_SUFFIX",
")",
";",
"if",
"(",
"index",
"!=",
"-",
"1",
")",
"{",
"handle",
"=",
"handle",
".",
"substring",
"(",
"0",
",",
"index",
")",
";",
"}",
"MarkupBehavior",
"markupBehaviorFor",
"=",
"registry",
".",
"getMarkupBehaviorFor",
"(",
"handle",
")",
";",
"V1PortletDescription",
"description",
"=",
"markupBehaviorFor",
".",
"getPortletDescriptionFor",
"(",
"handle",
")",
";",
"if",
"(",
"index",
"!=",
"-",
"1",
")",
"{",
"description",
".",
"setPortletHandle",
"(",
"handle",
"+",
"CLONE_SUFFIX",
")",
";",
"}",
"portletDescription",
".",
"value",
"=",
"description",
";",
"}",
"@",
"Override",
"public",
"void",
"getPortletProperties",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"names\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"names",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"properties\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Property",
">",
">",
"properties",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ResetProperty",
">",
">",
"resetProperties",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"String",
"handle",
"=",
"getHandleFrom",
"(",
"portletContext",
",",
"\"\"",
")",
";",
"List",
"<",
"V1Property",
">",
"propertyList",
"=",
"new",
"ArrayList",
"<",
"V1Property",
">",
"(",
"1",
")",
";",
"if",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
".",
"equals",
"(",
"handle",
")",
")",
"{",
"propertyList",
".",
"add",
"(",
"WSRP1TypeFactory",
".",
"createProperty",
"(",
"PROPERTY_NAME",
",",
"\"en\"",
",",
"PROPERTY_VALUE",
")",
")",
";",
"}",
"else",
"if",
"(",
"CLONED_HANDLE",
".",
"equals",
"(",
"handle",
")",
")",
"{",
"if",
"(",
"propValue",
"!=",
"null",
")",
"{",
"propertyList",
".",
"add",
"(",
"WSRP1TypeFactory",
".",
"createProperty",
"(",
"PROPERTY_NAME",
",",
"\"en\"",
",",
"propValue",
")",
")",
";",
"}",
"if",
"(",
"callCount",
">",
"4",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"\"",
")",
";",
"}",
"}",
"else",
"{",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1InvalidHandle",
".",
"class",
",",
"\"\"",
"+",
"handle",
"+",
"\"'\"",
",",
"null",
")",
";",
"}",
"incrementCallCount",
"(",
")",
";",
"properties",
".",
"value",
"=",
"propertyList",
";",
"}",
"@",
"Override",
"public",
"void",
"setPortletProperties",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"propertyList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PropertyList",
"propertyList",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"String",
">",
"portletHandle",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"portletState\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"portletState",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"String",
"handle",
"=",
"getHandleFrom",
"(",
"portletContext",
",",
"\"\"",
")",
";",
"if",
"(",
"!",
"(",
"CLONED_HANDLE",
")",
".",
"equals",
"(",
"handle",
")",
")",
"{",
"throw",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1OperationFailed",
".",
"class",
",",
"\"\"",
"+",
"handle",
"+",
"\"'\"",
",",
"null",
")",
";",
"}",
"List",
"<",
"V1Property",
">",
"properties",
"=",
"propertyList",
".",
"getProperties",
"(",
")",
";",
"List",
"<",
"V1ResetProperty",
">",
"resetProperties",
"=",
"propertyList",
".",
"getResetProperties",
"(",
")",
";",
"if",
"(",
"ParameterValidation",
".",
"existsAndIsNotEmpty",
"(",
"properties",
")",
"&&",
"ParameterValidation",
".",
"existsAndIsNotEmpty",
"(",
"resetProperties",
")",
")",
"{",
"if",
"(",
"properties",
".",
"size",
"(",
")",
"!=",
"1",
"&&",
"resetProperties",
".",
"size",
"(",
")",
"!=",
"1",
")",
"{",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1InconsistentParameters",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"if",
"(",
"properties",
".",
"get",
"(",
"0",
")",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"resetProperties",
".",
"get",
"(",
"0",
")",
".",
"getName",
"(",
")",
")",
")",
"{",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1InconsistentParameters",
".",
"class",
",",
"CANNOT_BOTH_SET_AND_RESET_A_PROPERTY_AT_THE_SAME_TIME",
",",
"null",
")",
";",
"}",
"}",
"if",
"(",
"ParameterValidation",
".",
"existsAndIsNotEmpty",
"(",
"properties",
")",
")",
"{",
"if",
"(",
"properties",
".",
"size",
"(",
")",
"!=",
"1",
")",
"{",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1InconsistentParameters",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"V1Property",
"property",
"=",
"properties",
".",
"get",
"(",
"0",
")",
";",
"String",
"name",
"=",
"property",
".",
"getName",
"(",
")",
";",
"if",
"(",
"name",
".",
"equals",
"(",
"PROPERTY_NAME",
")",
")",
"{",
"propValue",
"=",
"property",
".",
"getStringValue",
"(",
")",
";",
"}",
"else",
"{",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1InconsistentParameters",
".",
"class",
",",
"\"\"",
"+",
"name",
"+",
"\"'\"",
",",
"null",
")",
";",
"}",
"}",
"if",
"(",
"ParameterValidation",
".",
"existsAndIsNotEmpty",
"(",
"resetProperties",
")",
")",
"{",
"if",
"(",
"resetProperties",
".",
"size",
"(",
")",
"!=",
"1",
")",
"{",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1InconsistentParameters",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"V1ResetProperty",
"resetProperty",
"=",
"resetProperties",
".",
"get",
"(",
"0",
")",
";",
"String",
"name",
"=",
"resetProperty",
".",
"getName",
"(",
")",
";",
"if",
"(",
"name",
".",
"equals",
"(",
"PROPERTY_NAME",
")",
")",
"{",
"propValue",
"=",
"PROPERTY_VALUE",
";",
"}",
"else",
"{",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1InconsistentParameters",
".",
"class",
",",
"\"\"",
"+",
"name",
"+",
"\"'\"",
",",
"null",
")",
";",
"}",
"}",
"portletHandle",
".",
"value",
"=",
"handle",
";",
"}",
"private",
"String",
"getHandleFrom",
"(",
"V1PortletContext",
"portletContext",
",",
"String",
"context",
")",
"throws",
"V1MissingParameters",
",",
"V1InvalidHandle",
"{",
"WSRP1ExceptionFactory",
".",
"throwMissingParametersIfValueIsMissing",
"(",
"portletContext",
",",
"\"\"",
",",
"context",
")",
";",
"String",
"handle",
"=",
"portletContext",
".",
"getPortletHandle",
"(",
")",
";",
"WSRP1ExceptionFactory",
".",
"throwMissingParametersIfValueIsMissing",
"(",
"handle",
",",
"\"\"",
",",
"\"\"",
")",
";",
"if",
"(",
"handle",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"throw",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1InvalidHandle",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"return",
"handle",
";",
"}",
"@",
"Override",
"public",
"void",
"destroyPortlets",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"portletHandles",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1DestroyFailed",
">",
">",
"destroyFailed",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1MissingParameters",
",",
"V1InconsistentParameters",
",",
"V1InvalidRegistration",
",",
"V1OperationFailed",
"{",
"super",
".",
"destroyPortlets",
"(",
"registrationContext",
",",
"portletHandles",
",",
"destroyFailed",
",",
"extensions",
")",
";",
"WSRP1ExceptionFactory",
".",
"throwMissingParametersIfValueIsMissing",
"(",
"portletHandles",
",",
"\"\"",
",",
"\"\"",
")",
";",
"if",
"(",
"portletHandles",
".",
"isEmpty",
"(",
")",
")",
"{",
"WSRP1ExceptionFactory",
".",
"throwMissingParametersIfValueIsMissing",
"(",
"portletHandles",
",",
"\"\"",
",",
"\"\"",
")",
";",
"}",
"List",
"<",
"V1DestroyFailed",
">",
"list",
"=",
"destroyFailed",
".",
"value",
";",
"if",
"(",
"list",
"==",
"null",
")",
"{",
"list",
"=",
"new",
"ArrayList",
"<",
"V1DestroyFailed",
">",
"(",
")",
";",
"destroyFailed",
".",
"value",
"=",
"list",
";",
"}",
"for",
"(",
"String",
"handle",
":",
"portletHandles",
")",
"{",
"if",
"(",
"!",
"CLONED_HANDLE",
".",
"equals",
"(",
"handle",
")",
")",
"{",
"list",
".",
"add",
"(",
"WSRP1TypeFactory",
".",
"createDestroyFailed",
"(",
"handle",
",",
"\"Handle",
"'\"",
"+",
"handle",
"+",
"\"\"",
")",
")",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
12,355 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1ExceptionFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"PerGroupInitCookieMarkupBehavior",
"extends",
"InitCookieMarkupBehavior",
"{",
"public",
"static",
"final",
"String",
"PER_GROUP_INIT_COOKIE_HANDLE",
"=",
"\"\"",
";",
"public",
"PerGroupInitCookieMarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"super",
"(",
"registry",
")",
";",
"}",
"protected",
"void",
"initPortletHandle",
"(",
")",
"{",
"portletHandle",
"=",
"PER_GROUP_INIT_COOKIE_HANDLE",
";",
"}",
"@",
"Override",
"public",
"List",
"<",
"V1Extension",
">",
"initCookie",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
")",
"throws",
"V1InvalidRegistration",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"List",
"<",
"V1Extension",
">",
"extensions",
"=",
"super",
".",
"initCookie",
"(",
"registrationContext",
")",
";",
"if",
"(",
"initCookieCallCount",
">",
"3",
")",
"{",
"throw",
"WSRP1ExceptionFactory",
".",
"throwWSException",
"(",
"V1OperationFailed",
".",
"class",
",",
"\"\"",
",",
"new",
"IllegalStateException",
"(",
"\"\"",
")",
")",
";",
"}",
"return",
"extensions",
";",
"}",
"}",
"</s>"
] |
12,356 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"NotYetImplemented",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"util",
".",
"Version",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"MarkupService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"PortletManagementService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"RegistrationService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"ServiceDescriptionService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"ServiceFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"v1",
".",
"V1MarkupService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"v1",
".",
"V1PortletManagementService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"v1",
".",
"V1RegistrationService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"v1",
".",
"V1ServiceDescriptionService",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"RequestedMarkupBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedWindowState",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1MarkupPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1PortletManagementPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1RegistrationPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1ServiceDescriptionPortType",
";",
"public",
"class",
"BehaviorBackedServiceFactory",
"implements",
"ServiceFactory",
"{",
"private",
"BehaviorRegistry",
"registry",
";",
"private",
"final",
"static",
"String",
"MARKUP",
"=",
"\"markup\"",
";",
"private",
"boolean",
"initialized",
"=",
"false",
";",
"private",
"String",
"wsdl",
"=",
"DEFAULT_WSDL_URL",
";",
"public",
"static",
"final",
"String",
"DEFAULT_WSDL_URL",
"=",
"\"\"",
";",
"private",
"int",
"timeout",
";",
"public",
"BehaviorBackedServiceFactory",
"(",
")",
"{",
"this",
"(",
"new",
"BehaviorRegistry",
"(",
")",
")",
";",
"}",
"public",
"BehaviorBackedServiceFactory",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"this",
".",
"registry",
"=",
"registry",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"SimpleMarkupBehavior",
"(",
")",
")",
";",
"}",
"public",
"<",
"T",
">",
"T",
"getService",
"(",
"Class",
"<",
"T",
">",
"serviceClass",
")",
"throws",
"Exception",
"{",
"if",
"(",
"!",
"isAvailable",
"(",
")",
"&&",
"!",
"isFailed",
"(",
")",
")",
"{",
"start",
"(",
")",
";",
"}",
"if",
"(",
"WSRPV1ServiceDescriptionPortType",
".",
"class",
".",
"isAssignableFrom",
"(",
"serviceClass",
")",
")",
"{",
"return",
"(",
"T",
")",
"registry",
".",
"getServiceDescriptionBehavior",
"(",
")",
";",
"}",
"if",
"(",
"WSRPV1MarkupPortType",
".",
"class",
".",
"isAssignableFrom",
"(",
"serviceClass",
")",
")",
"{",
"String",
"requestedMarkupBehavior",
"=",
"RequestedMarkupBehavior",
".",
"getRequestedMarkupBehavior",
"(",
")",
";",
"if",
"(",
"requestedMarkupBehavior",
"==",
"null",
")",
"{",
"requestedMarkupBehavior",
"=",
"MARKUP",
";",
"}",
"return",
"(",
"T",
")",
"registry",
".",
"getMarkupBehaviorFor",
"(",
"requestedMarkupBehavior",
")",
";",
"}",
"if",
"(",
"WSRPV1PortletManagementPortType",
".",
"class",
".",
"isAssignableFrom",
"(",
"serviceClass",
")",
")",
"{",
"return",
"(",
"T",
")",
"registry",
".",
"getPortletManagementBehavior",
"(",
")",
";",
"}",
"if",
"(",
"WSRPV1RegistrationPortType",
".",
"class",
".",
"isAssignableFrom",
"(",
"serviceClass",
")",
")",
"{",
"return",
"(",
"T",
")",
"registry",
".",
"getRegistrationBehavior",
"(",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"BehaviorRegistry",
"getRegistry",
"(",
")",
"{",
"return",
"registry",
";",
"}",
"public",
"void",
"setRegistry",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"this",
".",
"registry",
"=",
"registry",
";",
"}",
"public",
"boolean",
"isAvailable",
"(",
")",
"{",
"return",
"initialized",
";",
"}",
"public",
"boolean",
"isFailed",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"void",
"setFailed",
"(",
"boolean",
"failed",
")",
"{",
"}",
"public",
"void",
"setWSOperationTimeOut",
"(",
"int",
"msBeforeTimeOut",
")",
"{",
"if",
"(",
"msBeforeTimeOut",
"<",
"0",
")",
"{",
"msBeforeTimeOut",
"=",
"DEFAULT_TIMEOUT_MS",
";",
"}",
"timeout",
"=",
"msBeforeTimeOut",
";",
"}",
"public",
"int",
"getWSOperationTimeOut",
"(",
")",
"{",
"return",
"timeout",
";",
"}",
"public",
"ServiceDescriptionService",
"getServiceDescriptionService",
"(",
")",
"throws",
"Exception",
"{",
"return",
"new",
"V1ServiceDescriptionService",
"(",
"getService",
"(",
"WSRPV1ServiceDescriptionPortType",
".",
"class",
")",
")",
";",
"}",
"public",
"MarkupService",
"getMarkupService",
"(",
")",
"throws",
"Exception",
"{",
"return",
"new",
"V1MarkupService",
"(",
"getService",
"(",
"WSRPV1MarkupPortType",
".",
"class",
")",
")",
";",
"}",
"public",
"PortletManagementService",
"getPortletManagementService",
"(",
")",
"throws",
"Exception",
"{",
"return",
"new",
"V1PortletManagementService",
"(",
"getService",
"(",
"WSRPV1PortletManagementPortType",
".",
"class",
")",
")",
";",
"}",
"public",
"RegistrationService",
"getRegistrationService",
"(",
")",
"throws",
"Exception",
"{",
"return",
"new",
"V1RegistrationService",
"(",
"getService",
"(",
"WSRPV1RegistrationPortType",
".",
"class",
")",
")",
";",
"}",
"public",
"Version",
"getWSRPVersion",
"(",
")",
"{",
"return",
"ServiceFactory",
".",
"WSRP1",
";",
"}",
"public",
"boolean",
"refresh",
"(",
"boolean",
"force",
")",
"throws",
"Exception",
"{",
"if",
"(",
"force",
"||",
"(",
"!",
"isAvailable",
"(",
")",
"&&",
"!",
"isFailed",
"(",
")",
")",
")",
"{",
"start",
"(",
")",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"public",
"void",
"create",
"(",
")",
"throws",
"Exception",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"start",
"(",
")",
"throws",
"Exception",
"{",
"initialized",
"=",
"true",
";",
"}",
"public",
"void",
"stop",
"(",
")",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"public",
"void",
"setWsdlDefinitionURL",
"(",
"String",
"wsdlDefinitionURL",
")",
"{",
"wsdl",
"=",
"wsdlDefinitionURL",
";",
"}",
"public",
"String",
"getWsdlDefinitionURL",
"(",
")",
"{",
"return",
"wsdl",
";",
"}",
"public",
"void",
"destroy",
"(",
")",
"{",
"throw",
"new",
"NotYetImplemented",
"(",
")",
";",
"}",
"private",
"class",
"SimpleMarkupBehavior",
"extends",
"MarkupBehavior",
"{",
"public",
"SimpleMarkupBehavior",
"(",
")",
"{",
"super",
"(",
"BehaviorBackedServiceFactory",
".",
"this",
".",
"registry",
")",
";",
"registerHandle",
"(",
"MARKUP",
")",
";",
"}",
"@",
"Override",
"protected",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"V1GetMarkup",
"getMarkup",
")",
"throws",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1AccessDenied",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1UnsupportedLocale",
",",
"V1UnsupportedMode",
",",
"V1OperationFailed",
",",
"V1MissingParameters",
",",
"V1InvalidUserCategory",
",",
"V1InvalidRegistration",
",",
"V1UnsupportedMimeType",
"{",
"return",
"MARKUP",
";",
"}",
"}",
"public",
"void",
"enableWSS",
"(",
"boolean",
"enable",
")",
"{",
"}",
"public",
"boolean",
"isWSSEnabled",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"isWSSAvailable",
"(",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
12,357 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"net",
".",
"media",
".",
"MediaType",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPConstants",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1TypeFactory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1LocalizedString",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MarkupType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletDescription",
";",
"public",
"abstract",
"class",
"TestProducerBehavior",
"{",
"protected",
"int",
"callCount",
";",
"public",
"static",
"final",
"String",
"SAMPLE_DESCRIPTION",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"SAMPLE_SHORTTITLE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"SAMPLE_TITLE",
"=",
"\"SampleTitle\"",
";",
"public",
"static",
"final",
"String",
"SAMPLE_DISPLAYNAME",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"SAMPLE_KEYWORD",
"=",
"\"keyword\"",
";",
"public",
"void",
"incrementCallCount",
"(",
")",
"{",
"callCount",
"++",
";",
"}",
"public",
"int",
"getCallCount",
"(",
")",
"{",
"return",
"callCount",
";",
"}",
"public",
"V1PortletDescription",
"createPortletDescription",
"(",
"String",
"portletHandle",
",",
"String",
"suffix",
")",
"{",
"V1PortletDescription",
"portletDesc",
"=",
"new",
"V1PortletDescription",
"(",
")",
";",
"portletDesc",
".",
"setPortletHandle",
"(",
"portletHandle",
")",
";",
"V1MarkupType",
"markupType",
"=",
"new",
"V1MarkupType",
"(",
")",
";",
"markupType",
".",
"setMimeType",
"(",
"MediaType",
".",
"TEXT_HTML",
".",
"getValue",
"(",
")",
")",
";",
"markupType",
".",
"getModes",
"(",
")",
".",
"add",
"(",
"WSRPConstants",
".",
"VIEW_MODE",
")",
";",
"markupType",
".",
"getWindowStates",
"(",
")",
".",
"add",
"(",
"WSRPConstants",
".",
"NORMAL_WINDOW_STATE",
")",
";",
"markupType",
".",
"getLocales",
"(",
")",
".",
"addAll",
"(",
"WSRPConstants",
".",
"getDefaultLocales",
"(",
")",
")",
";",
"portletDesc",
".",
"getMarkupTypes",
"(",
")",
".",
"add",
"(",
"markupType",
")",
";",
"String",
"suffixString",
"=",
"suffix",
"==",
"null",
"?",
"\"\"",
":",
"suffix",
";",
"portletDesc",
".",
"setDescription",
"(",
"createLocalizedString",
"(",
"SAMPLE_DESCRIPTION",
"+",
"suffixString",
")",
")",
";",
"portletDesc",
".",
"setTitle",
"(",
"createLocalizedString",
"(",
"SAMPLE_TITLE",
"+",
"suffixString",
")",
")",
";",
"portletDesc",
".",
"setShortTitle",
"(",
"createLocalizedString",
"(",
"SAMPLE_SHORTTITLE",
"+",
"suffixString",
")",
")",
";",
"portletDesc",
".",
"setDisplayName",
"(",
"createLocalizedString",
"(",
"SAMPLE_DISPLAYNAME",
"+",
"suffixString",
")",
")",
";",
"portletDesc",
".",
"getKeywords",
"(",
")",
".",
"add",
"(",
"createLocalizedString",
"(",
"SAMPLE_KEYWORD",
"+",
"suffixString",
")",
")",
";",
"return",
"portletDesc",
";",
"}",
"public",
"static",
"V1LocalizedString",
"createLocalizedString",
"(",
"String",
"value",
")",
"{",
"return",
"WSRP1TypeFactory",
".",
"createLocalizedString",
"(",
"value",
")",
";",
"}",
"public",
"static",
"String",
"extractString",
"(",
"org",
".",
"gatein",
".",
"common",
".",
"i18n",
".",
"LocalizedString",
"ls",
")",
"{",
"return",
"ls",
".",
"getPreferredOrBestLocalizedMappingFor",
"(",
"new",
"String",
"[",
"]",
"{",
"\"en\"",
"}",
")",
".",
"getString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
12,358 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Property",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationData",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1RegistrationPortType",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"RegistrationBehavior",
"extends",
"TestProducerBehavior",
"implements",
"WSRPV1RegistrationPortType",
"{",
"public",
"static",
"final",
"String",
"REGISTRATION_HANDLE",
"=",
"\"registration\"",
";",
"public",
"void",
"register",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"consumerName\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"String",
"consumerName",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"String",
"consumerAgent",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"boolean",
"methodGetSupported",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"consumerModes",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"consumerWindowStates",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"consumerUserScopes",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"customUserProfileData",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"V1Property",
">",
"registrationProperties",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"INOUT",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"registrationHandle",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"registrationState",
")",
"throws",
"V1MissingParameters",
",",
"V1OperationFailed",
"{",
"incrementCallCount",
"(",
")",
";",
"registrationHandle",
".",
"value",
"=",
"REGISTRATION_HANDLE",
";",
"}",
"public",
"void",
"deregister",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"String",
"registrationHandle",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"byte",
"[",
"]",
"registrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"INOUT",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1InvalidRegistration",
",",
"V1OperationFailed",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"public",
"void",
"modifyRegistration",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationData",
"registrationData",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"registrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1InvalidRegistration",
",",
"V1MissingParameters",
",",
"V1OperationFailed",
"{",
"incrementCallCount",
"(",
")",
";",
"}",
"}",
"</s>"
] |
12,359 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"gatein",
".",
"common",
".",
"net",
".",
"media",
".",
"MediaType",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPUtils",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1TypeFactory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1GetMarkup",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InteractionParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidCookie",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidSession",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MarkupContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MarkupParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MarkupResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletStateChangeRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RuntimeContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1SessionContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedLocale",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMimeType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedMode",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UnsupportedWindowState",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UpdateResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1UserContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1MarkupPortType",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"abstract",
"class",
"MarkupBehavior",
"extends",
"TestProducerBehavior",
"implements",
"WSRPV1MarkupPortType",
"{",
"private",
"List",
"<",
"String",
">",
"handles",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
"3",
")",
";",
"private",
"BehaviorRegistry",
"registry",
";",
"protected",
"MarkupBehavior",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"this",
".",
"registry",
"=",
"registry",
";",
"}",
"protected",
"abstract",
"String",
"getMarkupString",
"(",
"Mode",
"mode",
",",
"WindowState",
"windowState",
",",
"String",
"navigationalState",
",",
"V1GetMarkup",
"getMarkup",
")",
"throws",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1AccessDenied",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1UnsupportedLocale",
",",
"V1UnsupportedMode",
",",
"V1OperationFailed",
",",
"V1MissingParameters",
",",
"V1InvalidUserCategory",
",",
"V1InvalidRegistration",
",",
"V1UnsupportedMimeType",
";",
"public",
"void",
"modifyResponseIfNeeded",
"(",
"V1MarkupResponse",
"markupResponse",
")",
"{",
"}",
"public",
"List",
"<",
"String",
">",
"getSupportedHandles",
"(",
")",
"{",
"return",
"handles",
";",
"}",
"public",
"V1PortletDescription",
"getPortletDescriptionFor",
"(",
"String",
"handle",
")",
"{",
"if",
"(",
"handles",
".",
"contains",
"(",
"handle",
")",
")",
"{",
"return",
"createPortletDescription",
"(",
"handle",
",",
"getSuffixFor",
"(",
"handle",
")",
")",
";",
"}",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
"+",
"\"\"",
"+",
"handle",
"+",
"\"'\"",
")",
";",
"}",
"protected",
"String",
"getSuffixFor",
"(",
"String",
"handle",
")",
"{",
"return",
"\"\"",
";",
"}",
"protected",
"void",
"registerHandle",
"(",
"String",
"handle",
")",
"{",
"handles",
".",
"add",
"(",
"handle",
")",
";",
"V1PortletDescription",
"portletDescription",
"=",
"createPortletDescription",
"(",
"handle",
",",
"getSuffixFor",
"(",
"handle",
")",
")",
";",
"registry",
".",
"getServiceDescriptionBehavior",
"(",
")",
".",
"addPortletDescription",
"(",
"portletDescription",
")",
";",
"}",
"public",
"void",
"performBlockingInteraction",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1InteractionParams",
"interactionParams",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1UpdateResponse",
">",
"updateResponse",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"redirectURL\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"String",
">",
"redirectURL",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1UnsupportedMimeType",
",",
"V1UnsupportedMode",
",",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1MissingParameters",
",",
"V1UnsupportedLocale",
",",
"V1InconsistentParameters",
",",
"V1PortletStateChangeRequired",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"}",
"public",
"List",
"<",
"V1Extension",
">",
"releaseSessions",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"sessionIDs\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"sessionIDs",
")",
"throws",
"V1MissingParameters",
",",
"V1InvalidRegistration",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"return",
"null",
";",
"}",
"public",
"void",
"getMarkup",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RuntimeContext",
"runtimeContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"markupParams\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1MarkupParams",
"markupParams",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1MarkupContext",
">",
"markupContext",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1SessionContext",
">",
"sessionContext",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1UnsupportedMimeType",
",",
"V1UnsupportedMode",
",",
"V1UnsupportedWindowState",
",",
"V1InvalidCookie",
",",
"V1InvalidSession",
",",
"V1MissingParameters",
",",
"V1UnsupportedLocale",
",",
"V1InconsistentParameters",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1InvalidUserCategory",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"V1GetMarkup",
"gm",
"=",
"new",
"V1GetMarkup",
"(",
")",
";",
"gm",
".",
"setMarkupParams",
"(",
"markupParams",
")",
";",
"gm",
".",
"setPortletContext",
"(",
"portletContext",
")",
";",
"gm",
".",
"setRegistrationContext",
"(",
"registrationContext",
")",
";",
"gm",
".",
"setRuntimeContext",
"(",
"runtimeContext",
")",
";",
"gm",
".",
"setUserContext",
"(",
"userContext",
")",
";",
"String",
"markupString",
"=",
"getMarkupString",
"(",
"WSRPUtils",
".",
"getJSR168PortletModeFromWSRPName",
"(",
"markupParams",
".",
"getMode",
"(",
")",
")",
",",
"WSRPUtils",
".",
"getJSR168WindowStateFromWSRPName",
"(",
"markupParams",
".",
"getWindowState",
"(",
")",
")",
",",
"markupParams",
".",
"getNavigationalState",
"(",
")",
",",
"gm",
")",
";",
"markupContext",
".",
"value",
"=",
"WSRP1TypeFactory",
".",
"createMarkupContext",
"(",
"MediaType",
".",
"TEXT_HTML",
".",
"getValue",
"(",
")",
",",
"markupString",
",",
"null",
",",
"null",
")",
";",
"markupContext",
".",
"value",
".",
"setRequiresUrlRewriting",
"(",
"Boolean",
".",
"TRUE",
")",
";",
"V1MarkupResponse",
"markupResponse",
"=",
"WSRP1TypeFactory",
".",
"createMarkupResponse",
"(",
"markupContext",
".",
"value",
")",
";",
"modifyResponseIfNeeded",
"(",
"markupResponse",
")",
";",
"sessionContext",
".",
"value",
"=",
"markupResponse",
".",
"getSessionContext",
"(",
")",
";",
"}",
"public",
"List",
"<",
"V1Extension",
">",
"initCookie",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
")",
"throws",
"V1InvalidRegistration",
",",
"V1AccessDenied",
",",
"V1OperationFailed",
"{",
"return",
"null",
";",
"}",
"}",
"</s>"
] |
12,360 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
";",
"public",
"interface",
"TestWSRPProducer",
"{",
"void",
"reset",
"(",
")",
";",
"BehaviorRegistry",
"getBehaviorRegistry",
"(",
")",
";",
"void",
"setCurrentMarkupBehaviorHandle",
"(",
"String",
"handle",
")",
";",
"void",
"setRequiresInitCookie",
"(",
"String",
"cookieProtocolAsString",
")",
";",
"void",
"usingStrictModeChangedTo",
"(",
"boolean",
"strictMode",
")",
";",
"}",
"</s>"
] |
12,361 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPConstants",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v1",
".",
"WSRP1TypeFactory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1CookieProtocol",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ItemDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PropertyDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ServiceDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1ServiceDescriptionPortType",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"HashSet",
";",
"import",
"java",
".",
"util",
".",
"LinkedList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"public",
"class",
"ServiceDescriptionBehavior",
"extends",
"TestProducerBehavior",
"implements",
"WSRPV1ServiceDescriptionPortType",
"{",
"protected",
"V1ServiceDescription",
"serviceDescription",
";",
"private",
"static",
"final",
"V1ServiceDescription",
"DEFAULT_SERVICE_DESCRIPTION",
"=",
"WSRP1TypeFactory",
".",
"createServiceDescription",
"(",
"false",
")",
";",
"public",
"static",
"final",
"ServiceDescriptionBehavior",
"DEFAULT",
"=",
"new",
"ServiceDescriptionBehavior",
"(",
")",
";",
"protected",
"List",
"<",
"V1PortletDescription",
">",
"offeredPortlets",
";",
"private",
"boolean",
"requiresRegistration",
";",
"private",
"V1CookieProtocol",
"cookieProtocol",
";",
"private",
"V1ModelDescription",
"registrationProperties",
";",
"public",
"ServiceDescriptionBehavior",
"(",
")",
"{",
"offeredPortlets",
"=",
"new",
"LinkedList",
"<",
"V1PortletDescription",
">",
"(",
")",
";",
"}",
"public",
"void",
"setRequiresRegistration",
"(",
"boolean",
"requiresRegistration",
")",
"{",
"this",
".",
"requiresRegistration",
"=",
"requiresRegistration",
";",
"}",
"public",
"void",
"setRequiresInitCookie",
"(",
"V1CookieProtocol",
"requiresInitCookie",
")",
"{",
"this",
".",
"cookieProtocol",
"=",
"requiresInitCookie",
";",
"}",
"public",
"void",
"setServiceDescription",
"(",
"boolean",
"requiresRegistration",
",",
"int",
"numberOfProps",
")",
"{",
"V1ServiceDescription",
"sd",
"=",
"createServiceDescription",
"(",
"requiresRegistration",
",",
"numberOfProps",
")",
";",
"offeredPortlets",
"=",
"sd",
".",
"getOfferedPortlets",
"(",
")",
";",
"this",
".",
"requiresRegistration",
"=",
"sd",
".",
"isRequiresRegistration",
"(",
")",
";",
"registrationProperties",
"=",
"sd",
".",
"getRegistrationPropertyDescription",
"(",
")",
";",
"}",
"public",
"static",
"V1ServiceDescription",
"getDefaultServiceDescription",
"(",
")",
"{",
"return",
"DEFAULT_SERVICE_DESCRIPTION",
";",
"}",
"public",
"void",
"addPortletDescription",
"(",
"V1PortletDescription",
"portletDescription",
")",
"{",
"offeredPortlets",
".",
"add",
"(",
"portletDescription",
")",
";",
"}",
"public",
"Set",
"<",
"String",
">",
"getPortletHandles",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"handles",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
"offeredPortlets",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"V1PortletDescription",
"description",
":",
"offeredPortlets",
")",
"{",
"handles",
".",
"add",
"(",
"description",
".",
"getPortletHandle",
"(",
")",
")",
";",
"}",
"return",
"handles",
";",
"}",
"public",
"int",
"getPortletNumber",
"(",
")",
"{",
"return",
"offeredPortlets",
".",
"size",
"(",
")",
";",
"}",
"public",
"static",
"V1ServiceDescription",
"createServiceDescription",
"(",
"boolean",
"requiresRegistration",
",",
"int",
"numberOfProperties",
")",
"{",
"V1ServiceDescription",
"sd",
"=",
"WSRP1TypeFactory",
".",
"createServiceDescription",
"(",
"requiresRegistration",
")",
";",
"if",
"(",
"requiresRegistration",
")",
"{",
"List",
"<",
"V1PropertyDescription",
">",
"descriptions",
"=",
"new",
"ArrayList",
"<",
"V1PropertyDescription",
">",
"(",
"numberOfProperties",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfProperties",
";",
"i",
"++",
")",
"{",
"descriptions",
".",
"add",
"(",
"WSRP1TypeFactory",
".",
"createPropertyDescription",
"(",
"\"prop\"",
"+",
"i",
",",
"WSRPConstants",
".",
"XSD_STRING",
")",
")",
";",
"}",
"sd",
".",
"setRegistrationPropertyDescription",
"(",
"WSRP1TypeFactory",
".",
"createModelDescription",
"(",
"descriptions",
")",
")",
";",
"}",
"return",
"sd",
";",
"}",
"public",
"void",
"getServiceDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"V1RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"Boolean",
">",
"requiresRegistration",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1PortletDescription",
">",
">",
"offeredPortlets",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"userCategoryDescriptions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"customUserProfileItemDescriptions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"customWindowStateDescriptions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"customModeDescriptions",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1CookieProtocol",
">",
"requiresInitCookie",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1ModelDescription",
">",
"registrationPropertyDescription",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"locales\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"locales",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"V1ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
",",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"extensions",
")",
"throws",
"V1InvalidRegistration",
",",
"V1OperationFailed",
"{",
"incrementCallCount",
"(",
")",
";",
"offeredPortlets",
".",
"value",
"=",
"this",
".",
"offeredPortlets",
";",
"requiresRegistration",
".",
"value",
"=",
"this",
".",
"requiresRegistration",
";",
"requiresInitCookie",
".",
"value",
"=",
"this",
".",
"cookieProtocol",
";",
"registrationPropertyDescription",
".",
"value",
"=",
"registrationProperties",
";",
"}",
"}",
"</s>"
] |
12,362 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
";",
"import",
"junit",
".",
"framework",
".",
"TestCase",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"InvokerUnavailableException",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"ServiceFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorBackedServiceFactory",
";",
"public",
"class",
"EndpointConfigurationInfoTestCase",
"extends",
"TestCase",
"{",
"private",
"EndpointConfigurationInfo",
"info",
";",
"private",
"String",
"url",
"=",
"\"\"",
";",
"protected",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"info",
"=",
"new",
"EndpointConfigurationInfo",
"(",
"new",
"BehaviorBackedServiceFactory",
"(",
")",
")",
";",
"}",
"public",
"void",
"testSetWSDLURL",
"(",
")",
"throws",
"InvokerUnavailableException",
"{",
"String",
"bea",
"=",
"\"\"",
";",
"info",
".",
"setWsdlDefinitionURL",
"(",
"bea",
")",
";",
"assertEquals",
"(",
"bea",
",",
"info",
".",
"getWsdlDefinitionURL",
"(",
")",
")",
";",
"}",
"public",
"void",
"testSetWSDLURLDoesNotTriggerWSDLRetrieval",
"(",
")",
"{",
"info",
".",
"setWsdlDefinitionURL",
"(",
"url",
")",
";",
"assertEquals",
"(",
"url",
",",
"info",
".",
"getWsdlDefinitionURL",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRefreshWSDL",
"(",
")",
"throws",
"Exception",
"{",
"assertTrue",
"(",
"info",
".",
"isRefreshNeeded",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isAvailable",
"(",
")",
")",
";",
"String",
"bea",
"=",
"\"\"",
";",
"info",
".",
"setWsdlDefinitionURL",
"(",
"bea",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isAvailable",
"(",
")",
")",
";",
"}",
"public",
"void",
"testGetRemoteHost",
"(",
")",
"{",
"String",
"bea",
"=",
"\"\"",
";",
"info",
".",
"setWsdlDefinitionURL",
"(",
"bea",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"info",
".",
"getRemoteHostAddress",
"(",
")",
")",
";",
"}",
"public",
"void",
"testGetServiceFactory",
"(",
")",
"throws",
"Exception",
"{",
"assertTrue",
"(",
"info",
".",
"isRefreshNeeded",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isAvailable",
"(",
")",
")",
";",
"ServiceFactory",
"factory",
"=",
"info",
".",
"getServiceFactory",
"(",
")",
";",
"assertNotNull",
"(",
"factory",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isAvailable",
"(",
")",
")",
";",
"assertTrue",
"(",
"factory",
".",
"isAvailable",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
12,363 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"services",
";",
"import",
"junit",
".",
"framework",
".",
"TestCase",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"services",
".",
"SOAPServiceFactory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1MarkupPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1PortletManagementPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1RegistrationPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"WSRPV1ServiceDescriptionPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2MarkupPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2PortletManagementPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2RegistrationPortType",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"WSRPV2ServiceDescriptionPortType",
";",
"import",
"javax",
".",
"wsdl",
".",
"WSDLException",
";",
"import",
"java",
".",
"net",
".",
"URL",
";",
"public",
"class",
"SOAPServiceFactoryTestCase",
"extends",
"TestCase",
"{",
"private",
"SOAPServiceFactory",
"factory",
";",
"public",
"static",
"final",
"Class",
"[",
"]",
"WSRP2_PORT_TYPES",
"=",
"new",
"Class",
"[",
"]",
"{",
"WSRPV2MarkupPortType",
".",
"class",
",",
"WSRPV2ServiceDescriptionPortType",
".",
"class",
",",
"WSRPV2PortletManagementPortType",
".",
"class",
",",
"WSRPV2RegistrationPortType",
".",
"class",
"}",
";",
"public",
"static",
"final",
"Class",
"[",
"]",
"WSRP1_PORT_TYPES",
"=",
"new",
"Class",
"[",
"]",
"{",
"WSRPV1MarkupPortType",
".",
"class",
",",
"WSRPV1ServiceDescriptionPortType",
".",
"class",
",",
"WSRPV1PortletManagementPortType",
".",
"class",
",",
"WSRPV1RegistrationPortType",
".",
"class",
"}",
";",
"@",
"Override",
"protected",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"factory",
"=",
"new",
"SOAPServiceFactory",
"(",
")",
";",
"}",
"private",
"String",
"getWSDLURL",
"(",
"String",
"fileName",
")",
"{",
"URL",
"url",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClassLoader",
"(",
")",
".",
"getResource",
"(",
"fileName",
")",
";",
"return",
"url",
".",
"toExternalForm",
"(",
")",
";",
"}",
"public",
"void",
"testMissingMandatoryPort",
"(",
")",
"throws",
"Exception",
"{",
"factory",
".",
"setWsdlDefinitionURL",
"(",
"getWSDLURL",
"(",
"\"\"",
")",
")",
";",
"try",
"{",
"checkPorts",
"(",
"WSRP2_PORT_TYPES",
")",
";",
"fail",
"(",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"e",
")",
"{",
"}",
"}",
"public",
"void",
"testV2ServiceWithExtraPorts",
"(",
")",
"throws",
"Exception",
"{",
"factory",
".",
"setWsdlDefinitionURL",
"(",
"getWSDLURL",
"(",
"\"\"",
")",
")",
";",
"checkPorts",
"(",
"WSRP2_PORT_TYPES",
")",
";",
"}",
"public",
"void",
"testWebsphere",
"(",
")",
"throws",
"Exception",
"{",
"factory",
".",
"setWsdlDefinitionURL",
"(",
"getWSDLURL",
"(",
"\"\"",
")",
")",
";",
"checkPorts",
"(",
"WSRPV2MarkupPortType",
".",
"class",
",",
"WSRPV2ServiceDescriptionPortType",
".",
"class",
",",
"WSRPV2PortletManagementPortType",
".",
"class",
")",
";",
"}",
"public",
"void",
"testSimpleV2Service",
"(",
")",
"throws",
"Exception",
"{",
"factory",
".",
"setWsdlDefinitionURL",
"(",
"getWSDLURL",
"(",
"\"\"",
")",
")",
";",
"checkPorts",
"(",
"WSRP2_PORT_TYPES",
")",
";",
"}",
"public",
"void",
"testSimpleV1Service",
"(",
")",
"throws",
"Exception",
"{",
"factory",
".",
"setWsdlDefinitionURL",
"(",
"getWSDLURL",
"(",
"\"\"",
")",
")",
";",
"checkPorts",
"(",
"WSRP1_PORT_TYPES",
")",
";",
"}",
"public",
"void",
"testBothServices",
"(",
")",
"throws",
"Exception",
"{",
"factory",
".",
"setWsdlDefinitionURL",
"(",
"getWSDLURL",
"(",
"\"\"",
")",
")",
";",
"checkPorts",
"(",
"WSRP2_PORT_TYPES",
")",
";",
"}",
"public",
"void",
"testDefaultDotNetWSDLCompositeService",
"(",
")",
"throws",
"Exception",
"{",
"factory",
".",
"setWsdlDefinitionURL",
"(",
"getWSDLURL",
"(",
"\"\"",
")",
")",
";",
"try",
"{",
"checkPorts",
"(",
"WSRP2_PORT_TYPES",
")",
";",
"fail",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"assertTrue",
"(",
"e",
"instanceof",
"WSDLException",
")",
";",
"WSDLException",
"wsdlEx",
"=",
"(",
"WSDLException",
")",
"e",
";",
"assertEquals",
"(",
"WSDLException",
".",
"OTHER_ERROR",
",",
"wsdlEx",
".",
"getFaultCode",
"(",
")",
")",
";",
"}",
"}",
"private",
"void",
"checkPorts",
"(",
"Class",
"...",
"ports",
")",
"throws",
"Exception",
"{",
"for",
"(",
"Class",
"portClass",
":",
"ports",
")",
"{",
"assertNotNull",
"(",
"factory",
".",
"getService",
"(",
"portClass",
")",
")",
";",
"}",
"}",
"}",
"</s>"
] |
12,364 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"handlers",
";",
"import",
"junit",
".",
"framework",
".",
"TestCase",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletInvokerException",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"URLFormat",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"PortletInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"response",
".",
"ContentResponse",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"response",
".",
"PortletInvocationResponse",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPResourceURL",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPRewritingConstants",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPTypeFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"MockWSRPConsumer",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"TestPortletInvocationContext",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"TestRenderInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"TestResourceInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"TestWindowContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MimeResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceContext",
";",
"import",
"java",
".",
"io",
".",
"UnsupportedEncodingException",
";",
"import",
"java",
".",
"net",
".",
"URL",
";",
"public",
"class",
"MimeResponseHandlerTestCase",
"extends",
"TestCase",
"{",
"public",
"static",
"final",
"String",
"NAMESPACE",
"=",
"\"NAMESPACE\"",
";",
"public",
"static",
"final",
"String",
"PORTLETID",
"=",
"\"PORTLETID\"",
";",
"public",
"static",
"final",
"MockWSRPConsumer",
"CONSUMER",
"=",
"new",
"MockWSRPConsumer",
"(",
"\"foo\"",
")",
";",
"public",
"static",
"final",
"PortletContext",
"PORTLET_CONTEXT",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"PORTLETID",
",",
"false",
")",
";",
"public",
"static",
"final",
"TestPortletInvocationContext",
"CONTEXT",
"=",
"new",
"TestPortletInvocationContext",
"(",
")",
";",
"public",
"static",
"final",
"URLFormat",
"FORMAT",
"=",
"new",
"URLFormat",
"(",
"false",
",",
"false",
",",
"true",
",",
"true",
")",
";",
"@",
"Override",
"protected",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"CONSUMER",
".",
"setUsingWSRP2",
"(",
"true",
")",
";",
"}",
"public",
"void",
"testProcessMarkupV1",
"(",
")",
"{",
"CONSUMER",
".",
"setUsingWSRP2",
"(",
"false",
")",
";",
"String",
"markup",
";",
"String",
"expected",
";",
"markup",
"=",
"\"\"",
"+",
"\"\"",
";",
"expected",
"=",
"\"\"",
"+",
"\"\"",
";",
"processMarkupAndCheck",
"(",
"markup",
",",
"expected",
")",
";",
"markup",
"=",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
";",
"expected",
"=",
"\"\"",
"+",
"NAMESPACE",
"+",
"\"\"",
"+",
"\"\"",
";",
"processMarkupAndCheck",
"(",
"markup",
",",
"expected",
")",
";",
"}",
"public",
"void",
"testProcessMarkupV2",
"(",
")",
"{",
"String",
"markup",
";",
"String",
"expected",
";",
"markup",
"=",
"\"\"",
"+",
"\"\"",
";",
"expected",
"=",
"\"\"",
"+",
"\"\"",
";",
"processMarkupAndCheck",
"(",
"markup",
",",
"expected",
")",
";",
"markup",
"=",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
";",
"expected",
"=",
"\"\"",
"+",
"NAMESPACE",
"+",
"\"\"",
"+",
"\"\"",
";",
"processMarkupAndCheck",
"(",
"markup",
",",
"expected",
")",
";",
"}",
"public",
"void",
"testURLEscaping",
"(",
")",
"throws",
"Exception",
"{",
"String",
"markup",
";",
"String",
"expected",
";",
"String",
"resourceID",
"=",
"WSRPResourceURL",
".",
"encodeResource",
"(",
"null",
",",
"new",
"URL",
"(",
"\"\"",
")",
",",
"false",
")",
";",
"markup",
"=",
"\"\"",
";",
"expected",
"=",
"\"\"",
"+",
"resourceID",
"+",
"\"'/>\"",
";",
"processMarkupAndCheck",
"(",
"markup",
",",
"expected",
")",
";",
"markup",
"=",
"\"\"",
";",
"expected",
"=",
"\"\"",
"+",
"resourceID",
"+",
"\"'/>\"",
";",
"processMarkupAndCheck",
"(",
"markup",
",",
"expected",
")",
";",
"markup",
"=",
"\"\"",
";",
"expected",
"=",
"\"\"",
"+",
"resourceID",
"+",
"\"'/>\"",
";",
"processMarkupAndCheck",
"(",
"markup",
",",
"expected",
")",
";",
"}",
"public",
"void",
"testRegularURLIsNotAffected",
"(",
")",
"{",
"String",
"markup",
";",
"markup",
"=",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
";",
"processMarkupAndCheck",
"(",
"markup",
",",
"markup",
")",
";",
"}",
"public",
"void",
"testRewritingRequiredWithBinaryContent",
"(",
")",
"throws",
"UnsupportedEncodingException",
",",
"PortletInvokerException",
"{",
"String",
"expected",
"=",
"\"\"",
"+",
"\".\"",
"+",
"TestWindowContext",
".",
"NAMESPACE",
"+",
"\"\"",
"+",
"\"{n\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"}\"",
";",
"byte",
"[",
"]",
"expectedBinary",
"=",
"expected",
".",
"getBytes",
"(",
"\"UTF-8\"",
")",
";",
"String",
"original",
"=",
"\"\"",
"+",
"\"\"",
"+",
"\"{n\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"}\"",
";",
"byte",
"[",
"]",
"originalBinary",
"=",
"original",
".",
"getBytes",
"(",
"\"UTF-8\"",
")",
";",
"processBinaryAndCheck",
"(",
"expectedBinary",
",",
"new",
"RenderHandler",
"(",
"CONSUMER",
")",
",",
"new",
"TestRenderInvocation",
"(",
"CONTEXT",
")",
",",
"WSRPTypeFactory",
".",
"createMimeResponse",
"(",
"\"text/css\"",
",",
"null",
",",
"originalBinary",
",",
"MarkupContext",
".",
"class",
")",
")",
";",
"processBinaryAndCheck",
"(",
"expectedBinary",
",",
"new",
"ResourceHandler",
"(",
"CONSUMER",
")",
",",
"new",
"TestResourceInvocation",
"(",
"CONTEXT",
")",
",",
"WSRPTypeFactory",
".",
"createMimeResponse",
"(",
"\"text/css\"",
",",
"null",
",",
"originalBinary",
",",
"ResourceContext",
".",
"class",
")",
")",
";",
"original",
"=",
"\"\"",
"+",
"\"\"",
"+",
"\"{n\"",
"+",
"\"\"",
"+",
"\"}\"",
";",
"originalBinary",
"=",
"original",
".",
"getBytes",
"(",
"\"UTF-8\"",
")",
";",
"expected",
"=",
"\"\"",
"+",
"\"function",
"\"",
"+",
"TestWindowContext",
".",
"NAMESPACE",
"+",
"\"\"",
"+",
"\"{n\"",
"+",
"\"\"",
"+",
"\"}\"",
";",
"expectedBinary",
"=",
"expected",
".",
"getBytes",
"(",
"\"UTF-8\"",
")",
";",
"processBinaryAndCheck",
"(",
"expectedBinary",
",",
"new",
"RenderHandler",
"(",
"CONSUMER",
")",
",",
"new",
"TestRenderInvocation",
"(",
"CONTEXT",
")",
",",
"WSRPTypeFactory",
".",
"createMimeResponse",
"(",
"\"\"",
",",
"null",
",",
"originalBinary",
",",
"MarkupContext",
".",
"class",
")",
")",
";",
"processBinaryAndCheck",
"(",
"expectedBinary",
",",
"new",
"ResourceHandler",
"(",
"CONSUMER",
")",
",",
"new",
"TestResourceInvocation",
"(",
"CONTEXT",
")",
",",
"WSRPTypeFactory",
".",
"createMimeResponse",
"(",
"\"\"",
",",
"null",
",",
"originalBinary",
",",
"ResourceContext",
".",
"class",
")",
")",
";",
"}",
"private",
"void",
"processBinaryAndCheck",
"(",
"byte",
"[",
"]",
"expectedBinary",
",",
"final",
"MimeResponseHandler",
"handler",
",",
"final",
"PortletInvocation",
"invocation",
",",
"final",
"MimeResponse",
"mimeResponse",
")",
"throws",
"PortletInvokerException",
"{",
"mimeResponse",
".",
"setRequiresRewriting",
"(",
"true",
")",
";",
"PortletInvocationResponse",
"response",
"=",
"handler",
".",
"rewriteResponseIfNeeded",
"(",
"mimeResponse",
",",
"invocation",
")",
";",
"assertTrue",
"(",
"response",
"instanceof",
"ContentResponse",
")",
";",
"ContentResponse",
"contentResponse",
"=",
"(",
"ContentResponse",
")",
"response",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"expectedBinary",
",",
"contentResponse",
".",
"getBytes",
"(",
")",
")",
";",
"}",
"private",
"void",
"processMarkupAndCheck",
"(",
"String",
"markup",
",",
"String",
"expected",
")",
"{",
"String",
"result",
"=",
"MimeResponseHandler",
".",
"processMarkup",
"(",
"markup",
",",
"NAMESPACE",
",",
"CONTEXT",
",",
"PORTLET_CONTEXT",
",",
"FORMAT",
",",
"CONSUMER",
")",
";",
"assertEquals",
"(",
"expected",
",",
"result",
")",
";",
"}",
"private",
"String",
"getResourceURL",
"(",
"String",
"encodedURL",
",",
"boolean",
"requiresRewrite",
")",
"{",
"String",
"result",
"=",
"WSRPRewritingConstants",
".",
"FAKE_RESOURCE_URL",
".",
"replace",
"(",
"WSRPRewritingConstants",
".",
"WSRP_URL",
",",
"encodedURL",
")",
";",
"result",
"=",
"result",
".",
"replace",
"(",
"WSRPRewritingConstants",
".",
"WSRP_REQUIRES_REWRITE",
",",
"Boolean",
".",
"toString",
"(",
"requiresRewrite",
")",
")",
";",
"return",
"result",
";",
"}",
"}",
"</s>"
] |
12,365 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
";",
"import",
"junit",
".",
"framework",
".",
"TestCase",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Portlet",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletInvokerException",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v2",
".",
"WSRP2Constants",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v2",
".",
"WSRP2ExceptionFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorBackedServiceFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"PortletManagementBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"RegistrationBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"ServiceDescriptionBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"GroupedPortletsServiceDescriptionBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"SupportedOptionsServiceDescriptionBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"MockConsumerRegistry",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"AccessDenied",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"CookieProtocol",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InconsistentParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidUserCategory",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Lifetime",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MissingParameters",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationNotSupported",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Property",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationData",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"UserContext",
";",
"import",
"javax",
".",
"jws",
".",
"WebParam",
";",
"import",
"javax",
".",
"xml",
".",
"namespace",
".",
"QName",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Collection",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"ProducerInfoTestCase",
"extends",
"TestCase",
"{",
"private",
"ProducerInfo",
"info",
";",
"private",
"BehaviorBackedServiceFactory",
"serviceFactory",
";",
"protected",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"info",
"=",
"new",
"ProducerInfo",
"(",
"new",
"MockConsumerRegistry",
"(",
")",
")",
";",
"info",
".",
"setId",
"(",
"\"test\"",
")",
";",
"info",
".",
"setKey",
"(",
"\"key\"",
")",
";",
"serviceFactory",
"=",
"new",
"BehaviorBackedServiceFactory",
"(",
")",
";",
"EndpointConfigurationInfo",
"eci",
"=",
"new",
"EndpointConfigurationInfo",
"(",
"serviceFactory",
")",
";",
"info",
".",
"setEndpointConfigurationInfo",
"(",
"eci",
")",
";",
"}",
"public",
"void",
"testSettersWithoutModificationShouldNotChangeLastModified",
"(",
")",
"{",
"final",
"long",
"initial",
"=",
"info",
".",
"getLastModified",
"(",
")",
";",
"info",
".",
"setActive",
"(",
"info",
".",
"isActive",
"(",
")",
")",
";",
"assertEquals",
"(",
"initial",
",",
"info",
".",
"getLastModified",
"(",
")",
")",
";",
"info",
".",
"setActiveAndSave",
"(",
"info",
".",
"isActive",
"(",
")",
")",
";",
"assertEquals",
"(",
"initial",
",",
"info",
".",
"getLastModified",
"(",
")",
")",
";",
"info",
".",
"setExpirationCacheSeconds",
"(",
"info",
".",
"getExpirationCacheSeconds",
"(",
")",
")",
";",
"assertEquals",
"(",
"initial",
",",
"info",
".",
"getLastModified",
"(",
")",
")",
";",
"info",
".",
"setId",
"(",
"info",
".",
"getId",
"(",
")",
")",
";",
"assertEquals",
"(",
"initial",
",",
"info",
".",
"getLastModified",
"(",
")",
")",
";",
"info",
".",
"setModifyRegistrationRequired",
"(",
"info",
".",
"isModifyRegistrationRequired",
"(",
")",
")",
";",
"assertEquals",
"(",
"initial",
",",
"info",
".",
"getLastModified",
"(",
")",
")",
";",
"}",
"public",
"void",
"testSettersWithModificationShouldChangeLastModified",
"(",
")",
"throws",
"InterruptedException",
"{",
"long",
"initial",
"=",
"info",
".",
"getLastModified",
"(",
")",
";",
"Thread",
".",
"sleep",
"(",
"10",
")",
";",
"info",
".",
"setActive",
"(",
"!",
"info",
".",
"isActive",
"(",
")",
")",
";",
"initial",
"=",
"info",
".",
"getLastModified",
"(",
")",
";",
"Thread",
".",
"sleep",
"(",
"10",
")",
";",
"info",
".",
"setActiveAndSave",
"(",
"!",
"info",
".",
"isActive",
"(",
")",
")",
";",
"assertTrue",
"(",
"initial",
"!=",
"info",
".",
"getLastModified",
"(",
")",
")",
";",
"initial",
"=",
"info",
".",
"getLastModified",
"(",
")",
";",
"Thread",
".",
"sleep",
"(",
"10",
")",
";",
"info",
".",
"setExpirationCacheSeconds",
"(",
"info",
".",
"getExpirationCacheSeconds",
"(",
")",
"+",
"1",
")",
";",
"assertTrue",
"(",
"initial",
"!=",
"info",
".",
"getLastModified",
"(",
")",
")",
";",
"initial",
"=",
"info",
".",
"getLastModified",
"(",
")",
";",
"Thread",
".",
"sleep",
"(",
"10",
")",
";",
"info",
".",
"setId",
"(",
"info",
".",
"getId",
"(",
")",
"+",
"\"other\"",
")",
";",
"assertTrue",
"(",
"initial",
"!=",
"info",
".",
"getLastModified",
"(",
")",
")",
";",
"initial",
"=",
"info",
".",
"getLastModified",
"(",
")",
";",
"Thread",
".",
"sleep",
"(",
"10",
")",
";",
"info",
".",
"setModifyRegistrationRequired",
"(",
"!",
"info",
".",
"isModifyRegistrationRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"initial",
"!=",
"info",
".",
"getLastModified",
"(",
")",
")",
";",
"}",
"public",
"void",
"testSetKeyDoesNotChangeLastModified",
"(",
")",
"{",
"long",
"initial",
"=",
"info",
".",
"getLastModified",
"(",
")",
";",
"info",
".",
"setKey",
"(",
"info",
".",
"getKey",
"(",
")",
")",
";",
"assertEquals",
"(",
"initial",
",",
"info",
".",
"getLastModified",
"(",
")",
")",
";",
"initial",
"=",
"info",
".",
"getLastModified",
"(",
")",
";",
"info",
".",
"setKey",
"(",
"info",
".",
"getKey",
"(",
")",
"+",
"\"other\"",
")",
";",
"assertEquals",
"(",
"initial",
",",
"info",
".",
"getLastModified",
"(",
")",
")",
";",
"}",
"public",
"void",
"testSetRegistrationInfo",
"(",
")",
"{",
"RegistrationInfo",
"regInfo",
"=",
"new",
"RegistrationInfo",
"(",
"info",
")",
";",
"assertEquals",
"(",
"regInfo",
",",
"info",
".",
"getRegistrationInfo",
"(",
")",
")",
";",
"assertEquals",
"(",
"info",
",",
"regInfo",
".",
"getParent",
"(",
")",
")",
";",
"RegistrationInfo",
"regInfo2",
"=",
"new",
"RegistrationInfo",
"(",
")",
";",
"assertEquals",
"(",
"regInfo",
",",
"info",
".",
"getRegistrationInfo",
"(",
")",
")",
";",
"assertNull",
"(",
"regInfo2",
".",
"getParent",
"(",
")",
")",
";",
"info",
".",
"setRegistrationInfo",
"(",
"regInfo2",
")",
";",
"assertEquals",
"(",
"regInfo2",
",",
"info",
".",
"getRegistrationInfo",
"(",
")",
")",
";",
"assertEquals",
"(",
"info",
",",
"regInfo2",
".",
"getParent",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRefreshDidNotHappenIfFailure",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"serviceFactory",
".",
"setFailed",
"(",
"true",
")",
";",
"final",
"boolean",
"refresh",
"=",
"info",
".",
"refresh",
"(",
"false",
")",
";",
"assertFalse",
"(",
"refresh",
")",
";",
"}",
"public",
"void",
"testSetNullRegistrationInfo",
"(",
")",
"{",
"try",
"{",
"info",
".",
"setRegistrationInfo",
"(",
"null",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"expected",
")",
"{",
"}",
"}",
"public",
"void",
"testSetEndpointConfigurationInfo",
"(",
")",
"{",
"EndpointConfigurationInfo",
"endInfo",
"=",
"new",
"EndpointConfigurationInfo",
"(",
")",
";",
"info",
".",
"setEndpointConfigurationInfo",
"(",
"endInfo",
")",
";",
"assertEquals",
"(",
"endInfo",
",",
"info",
".",
"getEndpointConfigurationInfo",
"(",
")",
")",
";",
"}",
"public",
"void",
"testSetNullEndpointConfigurationInfo",
"(",
")",
"{",
"try",
"{",
"info",
".",
"setEndpointConfigurationInfo",
"(",
"null",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"expected",
")",
"{",
"}",
"}",
"public",
"void",
"testSetNullCache",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"ServiceDescriptionBehavior",
"behavior",
"=",
"new",
"ServiceDescriptionBehavior",
"(",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"behavior",
")",
";",
"assertEquals",
"(",
"ProducerInfo",
".",
"DEFAULT_CACHE_VALUE",
",",
"info",
".",
"getExpirationCacheSeconds",
"(",
")",
")",
";",
"info",
".",
"setExpirationCacheSeconds",
"(",
"null",
")",
";",
"assertNull",
"(",
"info",
".",
"getExpirationCacheSeconds",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertEquals",
"(",
"2",
",",
"behavior",
".",
"getCallCount",
"(",
")",
")",
";",
"}",
"public",
"void",
"testSetNegativeCache",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"ServiceDescriptionBehavior",
"behavior",
"=",
"new",
"ServiceDescriptionBehavior",
"(",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"behavior",
")",
";",
"assertEquals",
"(",
"ProducerInfo",
".",
"DEFAULT_CACHE_VALUE",
",",
"info",
".",
"getExpirationCacheSeconds",
"(",
")",
")",
";",
"info",
".",
"setExpirationCacheSeconds",
"(",
"-",
"100",
")",
";",
"assertEquals",
"(",
"new",
"Integer",
"(",
"-",
"100",
")",
",",
"info",
".",
"getExpirationCacheSeconds",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertEquals",
"(",
"2",
",",
"behavior",
".",
"getCallCount",
"(",
")",
")",
";",
"}",
"public",
"void",
"testSetZeroCache",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"ServiceDescriptionBehavior",
"behavior",
"=",
"new",
"ServiceDescriptionBehavior",
"(",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"behavior",
")",
";",
"assertEquals",
"(",
"ProducerInfo",
".",
"DEFAULT_CACHE_VALUE",
",",
"info",
".",
"getExpirationCacheSeconds",
"(",
")",
")",
";",
"info",
".",
"setExpirationCacheSeconds",
"(",
"0",
")",
";",
"assertEquals",
"(",
"new",
"Integer",
"(",
"0",
")",
",",
"info",
".",
"getExpirationCacheSeconds",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertEquals",
"(",
"2",
",",
"behavior",
".",
"getCallCount",
"(",
")",
")",
";",
"}",
"public",
"void",
"testCacheTransitions",
"(",
")",
"throws",
"Exception",
"{",
"ServiceDescriptionBehavior",
"behavior",
"=",
"new",
"ServiceDescriptionBehavior",
"(",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"behavior",
")",
";",
"assertEquals",
"(",
"ProducerInfo",
".",
"DEFAULT_CACHE_VALUE",
",",
"info",
".",
"getExpirationCacheSeconds",
"(",
")",
")",
";",
"info",
".",
"setExpirationCacheSeconds",
"(",
"null",
")",
";",
"assertNull",
"(",
"info",
".",
"getExpirationCacheSeconds",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertEquals",
"(",
"2",
",",
"behavior",
".",
"getCallCount",
"(",
")",
")",
";",
"Thread",
".",
"sleep",
"(",
"10",
")",
";",
"info",
".",
"setExpirationCacheSeconds",
"(",
"1",
")",
";",
"assertEquals",
"(",
"new",
"Integer",
"(",
"1",
")",
",",
"info",
".",
"getExpirationCacheSeconds",
"(",
")",
")",
";",
"assertFalse",
"(",
"\"\"",
",",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertEquals",
"(",
"2",
",",
"behavior",
".",
"getCallCount",
"(",
")",
")",
";",
"Thread",
".",
"sleep",
"(",
"1100",
")",
";",
"assertFalse",
"(",
"\"\"",
",",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"info",
".",
"isRefreshNeeded",
"(",
"true",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"\"\"",
",",
"info",
".",
"isRefreshNeeded",
"(",
"true",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"true",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertEquals",
"(",
"4",
",",
"behavior",
".",
"getCallCount",
"(",
")",
")",
";",
"Thread",
".",
"sleep",
"(",
"10",
")",
";",
"info",
".",
"setExpirationCacheSeconds",
"(",
"0",
")",
";",
"assertEquals",
"(",
"new",
"Integer",
"(",
"0",
")",
",",
"info",
".",
"getExpirationCacheSeconds",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"\"\"",
",",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"true",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertEquals",
"(",
"6",
",",
"behavior",
".",
"getCallCount",
"(",
")",
")",
";",
"}",
"public",
"void",
"testGetPortlet",
"(",
")",
"throws",
"Exception",
"{",
"ServiceDescriptionBehavior",
"behavior",
"=",
"new",
"ServiceDescriptionBehavior",
"(",
")",
";",
"behavior",
".",
"addPortletDescription",
"(",
"behavior",
".",
"createPortletDescription",
"(",
"\"test\"",
",",
"null",
")",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"behavior",
")",
";",
"info",
".",
"setExpirationCacheSeconds",
"(",
"1000",
")",
";",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletContext",
"portletContext",
"=",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletContext",
".",
"createPortletContext",
"(",
"\"test\"",
",",
"false",
")",
";",
"Portlet",
"portlet",
"=",
"info",
".",
"getPortlet",
"(",
"portletContext",
")",
";",
"assertNotNull",
"(",
"portlet",
")",
";",
"assertEquals",
"(",
"portletContext",
",",
"portlet",
".",
"getContext",
"(",
")",
")",
";",
"assertEquals",
"(",
"1",
",",
"behavior",
".",
"getCallCount",
"(",
")",
")",
";",
"portletContext",
"=",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletContext",
".",
"createPortletContext",
"(",
"TestPortletManagementBehavior",
".",
"HANDLE_FOR_GET_DESCRIPTION",
",",
"false",
")",
";",
"TestPortletManagementBehavior",
"pmBehavior",
"=",
"new",
"TestPortletManagementBehavior",
"(",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setPortletManagementBehavior",
"(",
"pmBehavior",
")",
";",
"portlet",
"=",
"info",
".",
"getPortlet",
"(",
"portletContext",
")",
";",
"assertEquals",
"(",
"1",
",",
"pmBehavior",
".",
"getCallCount",
"(",
")",
")",
";",
"assertNotNull",
"(",
"portlet",
")",
";",
"assertEquals",
"(",
"portletContext",
",",
"portlet",
".",
"getContext",
"(",
")",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setPortletManagementBehavior",
"(",
"null",
")",
";",
"final",
"String",
"handle",
"=",
"\"test3\"",
";",
"behavior",
".",
"addPortletDescription",
"(",
"behavior",
".",
"createPortletDescription",
"(",
"handle",
",",
"null",
")",
")",
";",
"portletContext",
"=",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletContext",
".",
"createPortletContext",
"(",
"handle",
",",
"false",
")",
";",
"portlet",
"=",
"info",
".",
"getPortlet",
"(",
"portletContext",
")",
";",
"assertEquals",
"(",
"2",
",",
"behavior",
".",
"getCallCount",
"(",
")",
")",
";",
"assertNotNull",
"(",
"portlet",
")",
";",
"assertEquals",
"(",
"portletContext",
",",
"portlet",
".",
"getContext",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRefreshAndRegistration",
"(",
")",
"throws",
"Exception",
"{",
"assertFalse",
"(",
"info",
".",
"isRegistered",
"(",
")",
")",
";",
"RegistrationInfo",
"regInfo",
"=",
"info",
".",
"getRegistrationInfo",
"(",
")",
";",
"assertTrue",
"(",
"regInfo",
".",
"isUndetermined",
"(",
")",
")",
";",
"ServiceDescriptionBehavior",
"sd",
"=",
"new",
"ServiceDescriptionBehavior",
"(",
")",
";",
"sd",
".",
"setRequiresRegistration",
"(",
"true",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"sd",
")",
";",
"RegistrationBehavior",
"regBehavior",
"=",
"new",
"RegistrationBehavior",
"(",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setRegistrationBehavior",
"(",
"regBehavior",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertEquals",
"(",
"1",
",",
"regBehavior",
".",
"getCallCount",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistered",
"(",
")",
")",
";",
"assertNotNull",
"(",
"info",
".",
"getRegistrationInfo",
"(",
")",
")",
";",
"assertEquals",
"(",
"RegistrationBehavior",
".",
"REGISTRATION_HANDLE",
",",
"info",
".",
"getRegistrationContext",
"(",
")",
".",
"getRegistrationHandle",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"true",
")",
")",
";",
"assertEquals",
"(",
"1",
",",
"regBehavior",
".",
"getCallCount",
"(",
")",
")",
";",
"}",
"public",
"void",
"testGetRegistrationContext",
"(",
")",
"throws",
"Exception",
"{",
"assertFalse",
"(",
"info",
".",
"isRegistered",
"(",
")",
")",
";",
"RegistrationInfo",
"regInfo",
"=",
"info",
".",
"getRegistrationInfo",
"(",
")",
";",
"assertTrue",
"(",
"regInfo",
".",
"isUndetermined",
"(",
")",
")",
";",
"ServiceDescriptionBehavior",
"sd",
"=",
"new",
"ServiceDescriptionBehavior",
"(",
")",
";",
"sd",
".",
"setRequiresRegistration",
"(",
"true",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"sd",
")",
";",
"RegistrationBehavior",
"regBehavior",
"=",
"new",
"RegistrationBehavior",
"(",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setRegistrationBehavior",
"(",
"regBehavior",
")",
";",
"RegistrationContext",
"registrationContext",
"=",
"info",
".",
"getRegistrationContext",
"(",
")",
";",
"assertNotNull",
"(",
"registrationContext",
")",
";",
"assertEquals",
"(",
"RegistrationBehavior",
".",
"REGISTRATION_HANDLE",
",",
"registrationContext",
".",
"getRegistrationHandle",
"(",
")",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"1",
",",
"regBehavior",
".",
"getCallCount",
"(",
")",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"2",
",",
"sd",
".",
"getCallCount",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRegister",
"(",
")",
"throws",
"Exception",
"{",
"ServiceDescriptionBehavior",
"sd",
"=",
"new",
"ServiceDescriptionBehavior",
"(",
")",
";",
"sd",
".",
"setServiceDescription",
"(",
"true",
",",
"1",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"sd",
")",
";",
"RegistrationBehavior",
"regBehavior",
"=",
"new",
"TestRegistrationBehavior",
"(",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setRegistrationBehavior",
"(",
"regBehavior",
")",
";",
"try",
"{",
"info",
".",
"register",
"(",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"PortletInvokerException",
"expected",
")",
"{",
"}",
"RegistrationInfo",
"regInfo",
"=",
"info",
".",
"getRegistrationInfo",
"(",
")",
";",
"regInfo",
".",
"setRegistrationPropertyValue",
"(",
"TestRegistrationBehavior",
".",
"PROP_NAME",
",",
"TestRegistrationBehavior",
".",
"ORIGINAL_VALUE",
")",
";",
"info",
".",
"register",
"(",
")",
";",
"RegistrationContext",
"registrationContext",
"=",
"info",
".",
"getRegistrationContext",
"(",
")",
";",
"assertNotNull",
"(",
"registrationContext",
")",
";",
"assertEquals",
"(",
"RegistrationBehavior",
".",
"REGISTRATION_HANDLE",
",",
"registrationContext",
".",
"getRegistrationHandle",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistered",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationRequired",
"(",
")",
")",
";",
"}",
"public",
"void",
"testDeregister",
"(",
")",
"throws",
"Exception",
"{",
"try",
"{",
"info",
".",
"deregister",
"(",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalStateException",
"expected",
")",
"{",
"}",
"register",
"(",
")",
";",
"info",
".",
"deregister",
"(",
")",
";",
"assertNull",
"(",
"info",
".",
"getRegistrationContext",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistered",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationChecked",
"(",
")",
")",
";",
"}",
"private",
"void",
"register",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"ServiceDescriptionBehavior",
"sd",
"=",
"new",
"ServiceDescriptionBehavior",
"(",
")",
";",
"sd",
".",
"setServiceDescription",
"(",
"true",
",",
"1",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"sd",
")",
";",
"RegistrationBehavior",
"regBehavior",
"=",
"new",
"TestRegistrationBehavior",
"(",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setRegistrationBehavior",
"(",
"regBehavior",
")",
";",
"info",
".",
"refresh",
"(",
"false",
")",
";",
"RegistrationInfo",
"regInfo",
"=",
"info",
".",
"getRegistrationInfo",
"(",
")",
";",
"regInfo",
".",
"setRegistrationPropertyValue",
"(",
"TestRegistrationBehavior",
".",
"PROP_NAME",
",",
"TestRegistrationBehavior",
".",
"ORIGINAL_VALUE",
")",
";",
"info",
".",
"register",
"(",
")",
";",
"}",
"public",
"void",
"testModifyRegistration",
"(",
")",
"throws",
"Exception",
"{",
"try",
"{",
"info",
".",
"modifyRegistration",
"(",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalStateException",
"expected",
")",
"{",
"}",
"register",
"(",
")",
";",
"RegistrationInfo",
"regInfo",
"=",
"info",
".",
"getRegistrationInfo",
"(",
")",
";",
"regInfo",
".",
"setRegistrationPropertyValue",
"(",
"TestRegistrationBehavior",
".",
"PROP_NAME",
",",
"\"invalid\"",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistered",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isModifyRegistrationRequired",
"(",
")",
")",
";",
"RegistrationProperty",
"prop",
"=",
"regInfo",
".",
"getRegistrationProperty",
"(",
"TestRegistrationBehavior",
".",
"PROP_NAME",
")",
";",
"assertNull",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"try",
"{",
"info",
".",
"modifyRegistration",
"(",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"PortletInvokerException",
"expected",
")",
"{",
"}",
"regInfo",
".",
"setRegistrationPropertyValue",
"(",
"TestRegistrationBehavior",
".",
"PROP_NAME",
",",
"TestRegistrationBehavior",
".",
"MODIFIED_VALUE",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertNull",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isModifyRegistrationRequired",
"(",
")",
")",
";",
"info",
".",
"modifyRegistration",
"(",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"true",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
"false",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"refresh",
"(",
"false",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationRequired",
"(",
")",
")",
";",
"Boolean",
"invalid",
"=",
"prop",
".",
"isInvalid",
"(",
")",
";",
"assertNotNull",
"(",
"invalid",
")",
";",
"assertFalse",
"(",
"invalid",
")",
";",
"}",
"public",
"void",
"testGetInfoForEvent",
"(",
")",
"{",
"assertNull",
"(",
"info",
".",
"getInfoForEvent",
"(",
"null",
")",
")",
";",
"}",
"public",
"void",
"testRequiresInitCookieIsProperlySet",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"ServiceDescriptionBehavior",
"sdb",
"=",
"new",
"GroupedPortletsServiceDescriptionBehavior",
"(",
"new",
"ArrayList",
"<",
"PortletDescription",
">",
"(",
"3",
")",
")",
";",
"sdb",
".",
"setRequiresInitCookie",
"(",
"CookieProtocol",
".",
"PER_GROUP",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"sdb",
")",
";",
"info",
".",
"refresh",
"(",
"false",
")",
";",
"assertEquals",
"(",
"CookieProtocol",
".",
"PER_GROUP",
",",
"info",
".",
"getRequiresInitCookie",
"(",
")",
")",
";",
"}",
"public",
"void",
"testSupportedOptions",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"ServiceDescriptionBehavior",
"sdb",
"=",
"new",
"SupportedOptionsServiceDescriptionBehavior",
"(",
")",
";",
"serviceFactory",
".",
"getRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"sdb",
")",
";",
"info",
".",
"refresh",
"(",
"false",
")",
";",
"final",
"Collection",
"<",
"String",
">",
"supportedOptions",
"=",
"info",
".",
"getSupportedOptions",
"(",
")",
";",
"assertEquals",
"(",
"2",
",",
"supportedOptions",
".",
"size",
"(",
")",
")",
";",
"assertTrue",
"(",
"supportedOptions",
".",
"contains",
"(",
"WSRP2Constants",
".",
"OPTIONS_EXPORT",
")",
")",
";",
"assertTrue",
"(",
"supportedOptions",
".",
"contains",
"(",
"WSRP2Constants",
".",
"OPTIONS_IMPORT",
")",
")",
";",
"}",
"private",
"static",
"class",
"TestPortletManagementBehavior",
"extends",
"PortletManagementBehavior",
"{",
"public",
"static",
"final",
"String",
"HANDLE_FOR_GET_DESCRIPTION",
"=",
"\"test2\"",
";",
"@",
"Override",
"public",
"void",
"getPortletDescription",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"PortletContext",
"portletContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"List",
"<",
"String",
">",
"desiredLocales",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"PortletDescription",
">",
"portletDescription",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"resourceList\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"ResourceList",
">",
"resourceList",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"AccessDenied",
",",
"InconsistentParameters",
",",
"InvalidHandle",
",",
"InvalidRegistration",
",",
"InvalidUserCategory",
",",
"MissingParameters",
",",
"ModifyRegistrationRequired",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"super",
".",
"getPortletDescription",
"(",
"registrationContext",
",",
"portletContext",
",",
"userContext",
",",
"desiredLocales",
",",
"portletDescription",
",",
"resourceList",
",",
"extensions",
")",
";",
"portletDescription",
".",
"value",
"=",
"createPortletDescription",
"(",
"HANDLE_FOR_GET_DESCRIPTION",
",",
"null",
")",
";",
"}",
"}",
"private",
"static",
"class",
"TestRegistrationBehavior",
"extends",
"RegistrationBehavior",
"{",
"private",
"static",
"final",
"QName",
"PROP_NAME",
"=",
"QName",
".",
"valueOf",
"(",
"\"prop0\"",
")",
";",
"private",
"static",
"final",
"String",
"MODIFIED_VALUE",
"=",
"\"value2\"",
";",
"private",
"static",
"final",
"String",
"ORIGINAL_VALUE",
"=",
"\"value\"",
";",
"@",
"Override",
"public",
"void",
"register",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationData",
"registrationData",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"lifetime\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"Lifetime",
"lifetime",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"registrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Lifetime",
">",
"scheduledDestruction",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"String",
">",
"registrationHandle",
")",
"throws",
"MissingParameters",
",",
"OperationFailed",
",",
"OperationNotSupported",
"{",
"Property",
"prop",
"=",
"checkRegistrationData",
"(",
"registrationData",
".",
"getRegistrationProperties",
"(",
")",
")",
";",
"String",
"value",
"=",
"prop",
".",
"getStringValue",
"(",
")",
";",
"if",
"(",
"ORIGINAL_VALUE",
".",
"equals",
"(",
"value",
")",
"&&",
"PROP_NAME",
".",
"equals",
"(",
"prop",
".",
"getName",
"(",
")",
")",
")",
"{",
"super",
".",
"register",
"(",
"registrationData",
",",
"lifetime",
",",
"userContext",
",",
"registrationState",
",",
"scheduledDestruction",
",",
"extensions",
",",
"registrationHandle",
")",
";",
"return",
";",
"}",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"OperationFailed",
".",
"class",
",",
"value",
"+",
"\"\"",
"+",
"PROP_NAME",
",",
"null",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"modifyRegistration",
"(",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationContext",
"registrationContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"RegistrationData",
"registrationData",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"userContext\"",
",",
"targetNamespace",
"=",
"\"\"",
")",
"UserContext",
"userContext",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"byte",
"[",
"]",
">",
"registrationState",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"Lifetime",
">",
"scheduledDestruction",
",",
"@",
"WebParam",
"(",
"name",
"=",
"\"extensions\"",
",",
"targetNamespace",
"=",
"\"\"",
",",
"mode",
"=",
"WebParam",
".",
"Mode",
".",
"OUT",
")",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"extensions",
")",
"throws",
"InvalidRegistration",
",",
"MissingParameters",
",",
"OperationFailed",
",",
"OperationNotSupported",
",",
"ResourceSuspended",
"{",
"incrementCallCount",
"(",
")",
";",
"WSRP2ExceptionFactory",
".",
"throwMissingParametersIfValueIsMissing",
"(",
"registrationContext",
",",
"\"\"",
",",
"null",
")",
";",
"if",
"(",
"!",
"RegistrationBehavior",
".",
"REGISTRATION_HANDLE",
".",
"equals",
"(",
"registrationContext",
".",
"getRegistrationHandle",
"(",
")",
")",
")",
"{",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"InvalidRegistration",
".",
"class",
",",
"\"\"",
",",
"null",
")",
";",
"}",
"WSRP2ExceptionFactory",
".",
"throwMissingParametersIfValueIsMissing",
"(",
"registrationData",
",",
"\"\"",
",",
"null",
")",
";",
"Property",
"prop",
"=",
"checkRegistrationData",
"(",
"registrationData",
".",
"getRegistrationProperties",
"(",
")",
")",
";",
"String",
"value",
"=",
"prop",
".",
"getStringValue",
"(",
")",
";",
"if",
"(",
"MODIFIED_VALUE",
".",
"equals",
"(",
"value",
")",
"&&",
"PROP_NAME",
".",
"equals",
"(",
"prop",
".",
"getName",
"(",
")",
")",
")",
"{",
"return",
";",
"}",
"throw",
"WSRP2ExceptionFactory",
".",
"throwWSException",
"(",
"OperationFailed",
".",
"class",
",",
"value",
"+",
"\"\"",
"+",
"PROP_NAME",
",",
"null",
")",
";",
"}",
"private",
"Property",
"checkRegistrationData",
"(",
"List",
"<",
"Property",
">",
"registrationProperties",
")",
"throws",
"OperationFailed",
"{",
"WSRP2ExceptionFactory",
".",
"throwOperationFailedIfValueIsMissing",
"(",
"registrationProperties",
",",
"\"\"",
")",
";",
"Property",
"prop",
"=",
"registrationProperties",
".",
"get",
"(",
"0",
")",
";",
"WSRP2ExceptionFactory",
".",
"throwOperationFailedIfValueIsMissing",
"(",
"prop",
",",
"\"\"",
")",
";",
"return",
"prop",
";",
"}",
"}",
"}",
"</s>"
] |
12,366 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"registry",
";",
"import",
"junit",
".",
"framework",
".",
"TestCase",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPConsumer",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"ConsumerException",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"EndpointConfigurationInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"ProducerInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"RegistrationInfo",
";",
"import",
"org",
".",
"mockito",
".",
"Mockito",
";",
"import",
"java",
".",
"util",
".",
"Collection",
";",
"import",
"java",
".",
"util",
".",
"Collections",
";",
"public",
"class",
"ConsumerRegistryTestCase",
"extends",
"TestCase",
"{",
"protected",
"AbstractConsumerRegistry",
"registry",
";",
"@",
"Override",
"protected",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"registry",
"=",
"new",
"InMemoryConsumerRegistry",
"(",
")",
";",
"}",
"public",
"void",
"testCreateAndGet",
"(",
")",
"{",
"String",
"id",
"=",
"\"test\"",
";",
"WSRPConsumer",
"consumer",
"=",
"registry",
".",
"createConsumer",
"(",
"id",
",",
"null",
",",
"null",
")",
";",
"assertNotNull",
"(",
"consumer",
")",
";",
"assertEquals",
"(",
"id",
",",
"consumer",
".",
"getProducerId",
"(",
")",
")",
";",
"ProducerInfo",
"info",
"=",
"consumer",
".",
"getProducerInfo",
"(",
")",
";",
"assertNotNull",
"(",
"info",
")",
";",
"assertNotNull",
"(",
"info",
".",
"getKey",
"(",
")",
")",
";",
"assertEquals",
"(",
"consumer",
".",
"getProducerId",
"(",
")",
",",
"info",
".",
"getId",
"(",
")",
")",
";",
"EndpointConfigurationInfo",
"endpoint",
"=",
"info",
".",
"getEndpointConfigurationInfo",
"(",
")",
";",
"assertNotNull",
"(",
"endpoint",
")",
";",
"RegistrationInfo",
"regInfo",
"=",
"info",
".",
"getRegistrationInfo",
"(",
")",
";",
"assertTrue",
"(",
"regInfo",
".",
"isUndetermined",
"(",
")",
")",
";",
"assertEquals",
"(",
"registry",
",",
"info",
".",
"getRegistry",
"(",
")",
")",
";",
"assertTrue",
"(",
"registry",
".",
"containsConsumer",
"(",
"id",
")",
")",
";",
"WSRPConsumer",
"fromRegistry",
"=",
"registry",
".",
"getConsumer",
"(",
"id",
")",
";",
"assertNotNull",
"(",
"fromRegistry",
")",
";",
"assertEquals",
"(",
"consumer",
".",
"getProducerId",
"(",
")",
",",
"fromRegistry",
".",
"getProducerId",
"(",
")",
")",
";",
"ProducerInfo",
"fromRegistryInfo",
"=",
"fromRegistry",
".",
"getProducerInfo",
"(",
")",
";",
"assertNotNull",
"(",
"fromRegistryInfo",
")",
";",
"assertEquals",
"(",
"fromRegistry",
".",
"getProducerId",
"(",
")",
",",
"fromRegistryInfo",
".",
"getId",
"(",
")",
")",
";",
"assertNotNull",
"(",
"fromRegistryInfo",
".",
"getEndpointConfigurationInfo",
"(",
")",
")",
";",
"assertTrue",
"(",
"fromRegistryInfo",
".",
"getRegistrationInfo",
"(",
")",
".",
"isUndetermined",
"(",
")",
")",
";",
"assertEquals",
"(",
"registry",
",",
"fromRegistryInfo",
".",
"getRegistry",
"(",
")",
")",
";",
"assertEquals",
"(",
"info",
".",
"getId",
"(",
")",
",",
"fromRegistryInfo",
".",
"getId",
"(",
")",
")",
";",
"assertEquals",
"(",
"info",
".",
"getEndpointConfigurationInfo",
"(",
")",
",",
"fromRegistryInfo",
".",
"getEndpointConfigurationInfo",
"(",
")",
")",
";",
"assertEquals",
"(",
"info",
".",
"getRegistrationInfo",
"(",
")",
",",
"fromRegistryInfo",
".",
"getRegistrationInfo",
"(",
")",
")",
";",
"Collection",
"consumers",
"=",
"registry",
".",
"getConfiguredConsumers",
"(",
")",
";",
"assertNotNull",
"(",
"consumers",
")",
";",
"assertEquals",
"(",
"1",
",",
"consumers",
".",
"size",
"(",
")",
")",
";",
"assertTrue",
"(",
"consumers",
".",
"contains",
"(",
"consumer",
")",
")",
";",
"final",
"Collection",
"<",
"String",
">",
"ids",
"=",
"registry",
".",
"getConfiguredConsumersIds",
"(",
")",
";",
"assertNotNull",
"(",
"ids",
")",
";",
"assertEquals",
"(",
"1",
",",
"ids",
".",
"size",
"(",
")",
")",
";",
"assertTrue",
"(",
"ids",
".",
"contains",
"(",
"id",
")",
")",
";",
"assertEquals",
"(",
"1",
",",
"registry",
".",
"getConfiguredConsumerNumber",
"(",
")",
")",
";",
"}",
"public",
"void",
"testGetConsumer",
"(",
")",
"{",
"assertNull",
"(",
"registry",
".",
"getConsumer",
"(",
"\"inexistent\"",
")",
")",
";",
"}",
"public",
"void",
"testDoubleRegistrationOfConsumerWithSameId",
"(",
")",
"{",
"String",
"id",
"=",
"\"foo\"",
";",
"registry",
".",
"createConsumer",
"(",
"id",
",",
"null",
",",
"null",
")",
";",
"try",
"{",
"registry",
".",
"createConsumer",
"(",
"id",
",",
"null",
",",
"null",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"ConsumerException",
"expected",
")",
"{",
"}",
"}",
"public",
"void",
"testDelete",
"(",
")",
"{",
"String",
"id",
"=",
"\"id\"",
";",
"WSRPConsumer",
"consumer",
"=",
"registry",
".",
"createConsumer",
"(",
"id",
",",
"null",
",",
"null",
")",
";",
"assertEquals",
"(",
"consumer",
",",
"registry",
".",
"getConsumer",
"(",
"id",
")",
")",
";",
"assertTrue",
"(",
"registry",
".",
"containsConsumer",
"(",
"id",
")",
")",
";",
"assertEquals",
"(",
"1",
",",
"registry",
".",
"getConfiguredConsumerNumber",
"(",
")",
")",
";",
"registry",
".",
"destroyConsumer",
"(",
"id",
")",
";",
"assertFalse",
"(",
"registry",
".",
"containsConsumer",
"(",
"id",
")",
")",
";",
"assertNull",
"(",
"registry",
".",
"getConsumer",
"(",
"id",
")",
")",
";",
"assertEquals",
"(",
"0",
",",
"registry",
".",
"getConfiguredConsumerNumber",
"(",
")",
")",
";",
"}",
"public",
"void",
"testUpdateProducerInfo",
"(",
")",
"{",
"String",
"id",
"=",
"\"foo\"",
";",
"WSRPConsumer",
"consumer",
"=",
"registry",
".",
"createConsumer",
"(",
"id",
",",
"null",
",",
"null",
")",
";",
"ProducerInfo",
"info",
"=",
"consumer",
".",
"getProducerInfo",
"(",
")",
";",
"String",
"previousId",
"=",
"registry",
".",
"updateProducerInfo",
"(",
"info",
")",
";",
"assertNull",
"(",
"previousId",
")",
";",
"info",
".",
"setId",
"(",
"\"bar\"",
")",
";",
"previousId",
"=",
"registry",
".",
"updateProducerInfo",
"(",
"info",
")",
";",
"assertEquals",
"(",
"\"foo\"",
",",
"previousId",
")",
";",
"assertNull",
"(",
"registry",
".",
"getConsumer",
"(",
"id",
")",
")",
";",
"assertFalse",
"(",
"registry",
".",
"containsConsumer",
"(",
"id",
")",
")",
";",
"assertEquals",
"(",
"info",
",",
"consumer",
".",
"getProducerInfo",
"(",
")",
")",
";",
"assertEquals",
"(",
"consumer",
",",
"registry",
".",
"getConsumer",
"(",
"\"bar\"",
")",
")",
";",
"assertTrue",
"(",
"registry",
".",
"containsConsumer",
"(",
"\"bar\"",
")",
")",
";",
"assertEquals",
"(",
"1",
",",
"registry",
".",
"getConfiguredConsumerNumber",
"(",
")",
")",
";",
"}",
"public",
"void",
"testStoppingShouldNotStartConsumers",
"(",
")",
"throws",
"Exception",
"{",
"ProducerInfo",
"info",
"=",
"Mockito",
".",
"mock",
"(",
"ProducerInfo",
".",
"class",
")",
";",
"Mockito",
".",
"stub",
"(",
"info",
".",
"isActive",
"(",
")",
")",
".",
"toReturn",
"(",
"true",
")",
";",
"Mockito",
".",
"stub",
"(",
"info",
".",
"getId",
"(",
")",
")",
".",
"toReturn",
"(",
"\"foo\"",
")",
";",
"Mockito",
".",
"stub",
"(",
"info",
".",
"getKey",
"(",
")",
")",
".",
"toReturn",
"(",
"\"fooKey\"",
")",
";",
"EndpointConfigurationInfo",
"endpoint",
"=",
"Mockito",
".",
"mock",
"(",
"EndpointConfigurationInfo",
".",
"class",
")",
";",
"Mockito",
".",
"stub",
"(",
"info",
".",
"getEndpointConfigurationInfo",
"(",
")",
")",
".",
"toReturn",
"(",
"endpoint",
")",
";",
"registry",
".",
"save",
"(",
"info",
",",
"\"\"",
")",
";",
"WSRPConsumer",
"original",
"=",
"registry",
".",
"createConsumerFrom",
"(",
"info",
",",
"true",
")",
";",
"assertEquals",
"(",
"original",
",",
"registry",
".",
"getFederatingPortletInvoker",
"(",
")",
".",
"getFederatedInvoker",
"(",
"\"foo\"",
")",
".",
"getPortletInvoker",
"(",
")",
")",
";",
"WSRPConsumer",
"consumer",
"=",
"Mockito",
".",
"spy",
"(",
"original",
")",
";",
"AbstractConsumerRegistry",
"registrySpy",
"=",
"Mockito",
".",
"spy",
"(",
"registry",
")",
";",
"Mockito",
".",
"doReturn",
"(",
"consumer",
")",
".",
"when",
"(",
"registrySpy",
")",
".",
"getConsumer",
"(",
"\"foo\"",
")",
";",
"Mockito",
".",
"doReturn",
"(",
"Collections",
".",
"singletonList",
"(",
"consumer",
")",
")",
".",
"when",
"(",
"registrySpy",
")",
".",
"getConsumers",
"(",
"false",
")",
";",
"WSRPConsumer",
"foo",
"=",
"registrySpy",
".",
"getConsumer",
"(",
"\"foo\"",
")",
";",
"assertTrue",
"(",
"foo",
".",
"getProducerInfo",
"(",
")",
".",
"isActive",
"(",
")",
")",
";",
"assertEquals",
"(",
"consumer",
",",
"foo",
")",
";",
"consumer",
".",
"stop",
"(",
")",
";",
"registrySpy",
".",
"stop",
"(",
")",
";",
"Mockito",
".",
"verify",
"(",
"consumer",
",",
"Mockito",
".",
"times",
"(",
"0",
")",
")",
".",
"start",
"(",
")",
";",
"assertEquals",
"(",
"null",
",",
"registrySpy",
".",
"getFederatingPortletInvoker",
"(",
")",
".",
"getFederatedInvoker",
"(",
"\"foo\"",
")",
")",
";",
"}",
"public",
"void",
"testReloadConsumers",
"(",
")",
"{",
"WSRPConsumer",
"consumer1",
"=",
"registry",
".",
"createConsumer",
"(",
"\"consumer1\"",
",",
"null",
",",
"null",
")",
";",
"WSRPConsumer",
"consumer2",
"=",
"registry",
".",
"createConsumer",
"(",
"\"consumer2\"",
",",
"null",
",",
"null",
")",
";",
"assertEquals",
"(",
"2",
",",
"registry",
".",
"getConfiguredConsumersIds",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"consumer1",
",",
"registry",
".",
"getConsumer",
"(",
"consumer1",
".",
"getProducerId",
"(",
")",
")",
")",
";",
"assertEquals",
"(",
"consumer2",
",",
"registry",
".",
"getConsumer",
"(",
"consumer2",
".",
"getProducerId",
"(",
")",
")",
")",
";",
"registry",
".",
"reloadConsumers",
"(",
")",
";",
"assertEquals",
"(",
"2",
",",
"registry",
".",
"getConfiguredConsumersIds",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"consumer1",
",",
"registry",
".",
"getConsumer",
"(",
"consumer1",
".",
"getProducerId",
"(",
")",
")",
")",
";",
"assertEquals",
"(",
"consumer2",
",",
"registry",
".",
"getConsumer",
"(",
"consumer2",
".",
"getProducerId",
"(",
")",
")",
")",
";",
"}",
"public",
"void",
"testCacheSimple",
"(",
")",
"{",
"WSRPConsumer",
"consumer1",
"=",
"registry",
".",
"createConsumer",
"(",
"\"consumer1\"",
",",
"null",
",",
"null",
")",
";",
"assertTrue",
"(",
"registry",
".",
"containsConsumer",
"(",
"consumer1",
".",
"getProducerId",
"(",
")",
")",
")",
";",
"assertEquals",
"(",
"consumer1",
",",
"registry",
".",
"consumerCache",
".",
"getConsumer",
"(",
"consumer1",
".",
"getProducerId",
"(",
")",
")",
")",
";",
"final",
"ProducerInfo",
"info",
"=",
"consumer1",
".",
"getProducerInfo",
"(",
")",
";",
"info",
".",
"setId",
"(",
"\"foo\"",
")",
";",
"registry",
".",
"updateProducerInfo",
"(",
"info",
")",
";",
"assertEquals",
"(",
"consumer1",
",",
"registry",
".",
"getConsumer",
"(",
"\"foo\"",
")",
")",
";",
"registry",
".",
"destroyConsumer",
"(",
"\"foo\"",
")",
";",
"assertFalse",
"(",
"registry",
".",
"containsConsumer",
"(",
"\"foo\"",
")",
")",
";",
"}",
"public",
"void",
"testCacheModifyingProducerInfo",
"(",
")",
"{",
"WSRPConsumer",
"consumer1",
"=",
"registry",
".",
"createConsumer",
"(",
"\"consumer1\"",
",",
"null",
",",
"null",
")",
";",
"assertTrue",
"(",
"registry",
".",
"containsConsumer",
"(",
"consumer1",
".",
"getProducerId",
"(",
")",
")",
")",
";",
"final",
"ProducerInfo",
"info",
"=",
"consumer1",
".",
"getProducerInfo",
"(",
")",
";",
"info",
".",
"setId",
"(",
"\"foo\"",
")",
";",
"registry",
".",
"update",
"(",
"info",
")",
";",
"assertEquals",
"(",
"consumer1",
",",
"registry",
".",
"getConsumer",
"(",
"\"foo\"",
")",
")",
";",
"}",
"}",
"</s>"
] |
12,367 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
";",
"import",
"junit",
".",
"framework",
".",
"TestCase",
";",
"import",
"org",
".",
"apache",
".",
"commons",
".",
"httpclient",
".",
"Cookie",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPConstants",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPTypeFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"handlers",
".",
"ProducerSessionInformation",
";",
"public",
"class",
"ProducerSessionInformationTestCase",
"extends",
"TestCase",
"{",
"ProducerSessionInformation",
"info",
";",
"private",
"static",
"final",
"int",
"SLEEP_TIME",
"=",
"1500",
";",
"protected",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"info",
"=",
"new",
"ProducerSessionInformation",
"(",
")",
";",
"}",
"public",
"void",
"testUserCookie",
"(",
")",
"throws",
"Exception",
"{",
"assertNull",
"(",
"info",
".",
"getUserCookie",
"(",
")",
")",
";",
"Cookie",
"[",
"]",
"cookies",
"=",
"new",
"Cookie",
"[",
"]",
"{",
"createCookie",
"(",
"\"name\"",
",",
"\"value\"",
",",
"1",
")",
"}",
";",
"info",
".",
"setUserCookie",
"(",
"cookies",
")",
";",
"assertEquals",
"(",
"\"name=value\"",
",",
"info",
".",
"getUserCookie",
"(",
")",
")",
";",
"Thread",
".",
"sleep",
"(",
"SLEEP_TIME",
")",
";",
"assertNull",
"(",
"info",
".",
"getUserCookie",
"(",
")",
")",
";",
"cookies",
"=",
"new",
"Cookie",
"[",
"]",
"{",
"createCookie",
"(",
"\"name1\"",
",",
"\"value1\"",
",",
"1",
")",
",",
"createCookie",
"(",
"\"name2\"",
",",
"\"value2\"",
",",
"3",
")",
"}",
";",
"info",
".",
"setUserCookie",
"(",
"cookies",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"info",
".",
"getUserCookie",
"(",
")",
")",
";",
"Thread",
".",
"sleep",
"(",
"SLEEP_TIME",
")",
";",
"assertEquals",
"(",
"\"name2=value2\"",
",",
"info",
".",
"getUserCookie",
"(",
")",
")",
";",
"try",
"{",
"info",
".",
"setUserCookie",
"(",
"null",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"e",
")",
"{",
"}",
"}",
"public",
"void",
"testGroupCookies",
"(",
")",
"throws",
"Exception",
"{",
"String",
"groupId",
"=",
"\"groupId\"",
";",
"try",
"{",
"info",
".",
"setGroupCookieFor",
"(",
"groupId",
",",
"new",
"Cookie",
"[",
"]",
"{",
"createCookie",
"(",
"\"name1\"",
",",
"\"value1\"",
",",
"1",
")",
",",
"createCookie",
"(",
"\"name2\"",
",",
"\"value2\"",
",",
"-",
"1",
")",
"}",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalStateException",
"e",
")",
"{",
"}",
"info",
".",
"setPerGroupCookies",
"(",
"true",
")",
";",
"info",
".",
"setGroupCookieFor",
"(",
"groupId",
",",
"new",
"Cookie",
"[",
"]",
"{",
"createCookie",
"(",
"\"name1\"",
",",
"\"value1\"",
",",
"1",
")",
",",
"createCookie",
"(",
"\"name2\"",
",",
"\"value2\"",
",",
"WSRPConstants",
".",
"SESSION_NEVER_EXPIRES",
")",
"}",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"info",
".",
"getGroupCookieFor",
"(",
"groupId",
")",
")",
";",
"Thread",
".",
"sleep",
"(",
"SLEEP_TIME",
")",
";",
"assertEquals",
"(",
"\"name2=value2\"",
",",
"info",
".",
"getGroupCookieFor",
"(",
"groupId",
")",
")",
";",
"info",
".",
"clearGroupCookies",
"(",
")",
";",
"assertNull",
"(",
"info",
".",
"getGroupCookieFor",
"(",
"groupId",
")",
")",
";",
"}",
"public",
"void",
"testSessionForPortlet",
"(",
")",
"throws",
"Exception",
"{",
"String",
"handle",
"=",
"\"handle\"",
";",
"String",
"handle2",
"=",
"\"handle2\"",
";",
"String",
"sid",
"=",
"\"id\"",
";",
"String",
"sid2",
"=",
"\"id2\"",
";",
"assertNull",
"(",
"info",
".",
"getSessionIdForPortlet",
"(",
"handle",
")",
")",
";",
"assertEquals",
"(",
"0",
",",
"info",
".",
"getNumberOfSessions",
"(",
")",
")",
";",
"addSession",
"(",
"handle",
",",
"sid",
",",
"1",
")",
";",
"addSession",
"(",
"handle2",
",",
"sid2",
",",
"3",
")",
";",
"assertNull",
"(",
"info",
".",
"getSessionIdForPortlet",
"(",
"\"unknown\"",
")",
")",
";",
"assertEquals",
"(",
"sid",
",",
"info",
".",
"getSessionIdForPortlet",
"(",
"handle",
")",
")",
";",
"assertEquals",
"(",
"2",
",",
"info",
".",
"getNumberOfSessions",
"(",
")",
")",
";",
"Thread",
".",
"sleep",
"(",
"SLEEP_TIME",
")",
";",
"assertNull",
"(",
"info",
".",
"getSessionIdForPortlet",
"(",
"handle",
")",
")",
";",
"assertEquals",
"(",
"sid2",
",",
"info",
".",
"getSessionIdForPortlet",
"(",
"handle2",
")",
")",
";",
"assertEquals",
"(",
"1",
",",
"info",
".",
"getNumberOfSessions",
"(",
")",
")",
";",
"info",
".",
"removeSessionForPortlet",
"(",
"handle2",
")",
";",
"assertEquals",
"(",
"0",
",",
"info",
".",
"getNumberOfSessions",
"(",
")",
")",
";",
"}",
"public",
"void",
"testReplaceUserCookies",
"(",
")",
"throws",
"Exception",
"{",
"info",
".",
"setUserCookie",
"(",
"new",
"Cookie",
"[",
"]",
"{",
"createCookie",
"(",
"\"name\"",
",",
"\"value\"",
",",
"1",
")",
"}",
")",
";",
"info",
".",
"replaceUserCookiesWith",
"(",
"null",
")",
";",
"assertEquals",
"(",
"\"name=value\"",
",",
"info",
".",
"getUserCookie",
"(",
")",
")",
";",
"ProducerSessionInformation",
"other",
"=",
"new",
"ProducerSessionInformation",
"(",
")",
";",
"info",
".",
"replaceUserCookiesWith",
"(",
"other",
")",
";",
"assertEquals",
"(",
"\"name=value\"",
",",
"info",
".",
"getUserCookie",
"(",
")",
")",
";",
"other",
".",
"setUserCookie",
"(",
"new",
"Cookie",
"[",
"]",
"{",
"createCookie",
"(",
"\"name2\"",
",",
"\"value2\"",
",",
"1",
")",
"}",
")",
";",
"info",
".",
"replaceUserCookiesWith",
"(",
"other",
")",
";",
"assertEquals",
"(",
"\"name2=value2\"",
",",
"info",
".",
"getUserCookie",
"(",
")",
")",
";",
"Thread",
".",
"sleep",
"(",
"SLEEP_TIME",
")",
";",
"info",
".",
"replaceUserCookiesWith",
"(",
"other",
")",
";",
"assertNull",
"(",
"info",
".",
"getUserCookie",
"(",
")",
")",
";",
"}",
"public",
"void",
"testReleaseSessions",
"(",
")",
"{",
"addSession",
"(",
"\"handle\"",
",",
"\"id\"",
",",
"1",
")",
";",
"addSession",
"(",
"\"handle2\"",
",",
"\"id2\"",
",",
"1",
")",
";",
"addSession",
"(",
"\"handle3\"",
",",
"\"id3\"",
",",
"1",
")",
";",
"assertEquals",
"(",
"3",
",",
"info",
".",
"getNumberOfSessions",
"(",
")",
")",
";",
"info",
".",
"removeSessions",
"(",
")",
";",
"assertEquals",
"(",
"0",
",",
"info",
".",
"getNumberOfSessions",
"(",
")",
")",
";",
"addSession",
"(",
"\"handle\"",
",",
"\"id\"",
",",
"1",
")",
";",
"addSession",
"(",
"\"handle2\"",
",",
"\"id2\"",
",",
"2",
")",
";",
"info",
".",
"removeSession",
"(",
"\"id2\"",
")",
";",
"assertEquals",
"(",
"1",
",",
"info",
".",
"getNumberOfSessions",
"(",
")",
")",
";",
"assertNull",
"(",
"info",
".",
"getSessionIdForPortlet",
"(",
"\"handle2\"",
")",
")",
";",
"assertEquals",
"(",
"\"id\"",
",",
"info",
".",
"getSessionIdForPortlet",
"(",
"\"handle\"",
")",
")",
";",
"info",
".",
"removeSessionForPortlet",
"(",
"\"handle\"",
")",
";",
"assertEquals",
"(",
"0",
",",
"info",
".",
"getNumberOfSessions",
"(",
")",
")",
";",
"assertNull",
"(",
"info",
".",
"getSessionIdForPortlet",
"(",
"\"handle\"",
")",
")",
";",
"try",
"{",
"info",
".",
"removeSessionForPortlet",
"(",
"\"handle\"",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"expected",
")",
"{",
"}",
"}",
"public",
"void",
"testSetParentSessionId",
"(",
")",
"{",
"assertNull",
"(",
"info",
".",
"getParentSessionId",
"(",
")",
")",
";",
"String",
"id",
"=",
"\"session\"",
";",
"info",
".",
"setParentSessionId",
"(",
"id",
")",
";",
"assertEquals",
"(",
"id",
",",
"info",
".",
"getParentSessionId",
"(",
")",
")",
";",
"info",
".",
"setParentSessionId",
"(",
"id",
")",
";",
"try",
"{",
"info",
".",
"setParentSessionId",
"(",
"\"other\"",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalStateException",
"expected",
")",
"{",
"}",
"}",
"private",
"Cookie",
"createCookie",
"(",
"String",
"name",
",",
"String",
"value",
",",
"int",
"secondsBeforeExpiration",
")",
"{",
"return",
"new",
"Cookie",
"(",
"\"domain\"",
",",
"name",
",",
"value",
",",
"\"path\"",
",",
"secondsBeforeExpiration",
",",
"false",
")",
";",
"}",
"private",
"void",
"addSession",
"(",
"String",
"handle",
",",
"String",
"sid",
",",
"int",
"expires",
")",
"{",
"info",
".",
"addSessionForPortlet",
"(",
"handle",
",",
"WSRPTypeFactory",
".",
"createSessionContext",
"(",
"sid",
",",
"expires",
")",
")",
";",
"}",
"}",
"</s>"
] |
12,368 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
";",
"import",
"junit",
".",
"framework",
".",
"TestCase",
";",
"import",
"javax",
".",
"xml",
".",
"namespace",
".",
"QName",
";",
"public",
"class",
"RegistrationPropertyTestCase",
"extends",
"TestCase",
"{",
"private",
"RegistrationProperty",
"prop",
";",
"private",
"Listener",
"listener",
"=",
"new",
"Listener",
"(",
")",
";",
"private",
"static",
"final",
"String",
"VALUE",
"=",
"\"value\"",
";",
"private",
"static",
"final",
"String",
"NEW_VALUE",
"=",
"\"newValue\"",
";",
"private",
"class",
"Listener",
"implements",
"RegistrationProperty",
".",
"PropertyChangeListener",
"{",
"boolean",
"called",
";",
"public",
"void",
"propertyValueChanged",
"(",
"RegistrationProperty",
"property",
",",
"RegistrationProperty",
".",
"Status",
"previousStatus",
",",
"Object",
"oldValue",
",",
"Object",
"newValue",
")",
"{",
"called",
"=",
"(",
"prop",
"==",
"property",
")",
"&&",
"VALUE",
".",
"equals",
"(",
"oldValue",
")",
"&&",
"NEW_VALUE",
".",
"equals",
"(",
"newValue",
")",
";",
"}",
"}",
"protected",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"prop",
"=",
"new",
"RegistrationProperty",
"(",
"\"name\"",
",",
"VALUE",
",",
"\"en\"",
",",
"listener",
")",
";",
"}",
"public",
"void",
"testConstructor",
"(",
")",
"{",
"try",
"{",
"new",
"RegistrationProperty",
"(",
"(",
"String",
")",
"null",
",",
"VALUE",
",",
"\"en\"",
",",
"listener",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"}",
"try",
"{",
"new",
"RegistrationProperty",
"(",
"\"name\"",
",",
"null",
",",
"\"en\"",
",",
"listener",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"fail",
"(",
"\"\"",
")",
";",
"}",
"try",
"{",
"new",
"RegistrationProperty",
"(",
"\"name\"",
",",
"VALUE",
",",
"null",
",",
"listener",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"}",
"try",
"{",
"new",
"RegistrationProperty",
"(",
"\"name\"",
",",
"VALUE",
",",
"\"en\"",
",",
"null",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"}",
"}",
"public",
"void",
"testSetNullValue",
"(",
")",
"{",
"forceValid",
"(",
")",
";",
"prop",
".",
"setValue",
"(",
"null",
")",
";",
"assertNull",
"(",
"prop",
".",
"getValue",
"(",
")",
")",
";",
"assertTrue",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertTrue",
"(",
"prop",
".",
"isDeterminedInvalid",
"(",
")",
")",
";",
"assertEquals",
"(",
"RegistrationProperty",
".",
"Status",
".",
"MISSING_VALUE",
",",
"prop",
".",
"getStatus",
"(",
")",
")",
";",
"}",
"public",
"void",
"testGetters",
"(",
")",
"{",
"assertEquals",
"(",
"QName",
".",
"valueOf",
"(",
"\"name\"",
")",
",",
"prop",
".",
"getName",
"(",
")",
")",
";",
"assertEquals",
"(",
"\"value\"",
",",
"prop",
".",
"getValue",
"(",
")",
")",
";",
"assertEquals",
"(",
"\"en\"",
",",
"prop",
".",
"getLang",
"(",
")",
")",
";",
"assertNull",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertFalse",
"(",
"prop",
".",
"isDeterminedInvalid",
"(",
")",
")",
";",
"assertNull",
"(",
"prop",
".",
"getDescription",
"(",
")",
")",
";",
"assertEquals",
"(",
"RegistrationProperty",
".",
"Status",
".",
"UNCHECKED_VALUE",
",",
"prop",
".",
"getStatus",
"(",
")",
")",
";",
"}",
"public",
"void",
"testSetValue",
"(",
")",
"{",
"forceValid",
"(",
")",
";",
"prop",
".",
"setValue",
"(",
"VALUE",
")",
";",
"assertEquals",
"(",
"Boolean",
".",
"FALSE",
",",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertEquals",
"(",
"RegistrationProperty",
".",
"Status",
".",
"VALID",
",",
"prop",
".",
"getStatus",
"(",
")",
")",
";",
"prop",
".",
"setValue",
"(",
"NEW_VALUE",
")",
";",
"assertEquals",
"(",
"NEW_VALUE",
",",
"prop",
".",
"getValue",
"(",
")",
")",
";",
"assertNull",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertEquals",
"(",
"RegistrationProperty",
".",
"Status",
".",
"UNCHECKED_VALUE",
",",
"prop",
".",
"getStatus",
"(",
")",
")",
";",
"}",
"private",
"void",
"forceValid",
"(",
")",
"{",
"prop",
".",
"setStatus",
"(",
"RegistrationProperty",
".",
"Status",
".",
"VALID",
")",
";",
"}",
"public",
"void",
"testPropertyChangedEvent",
"(",
")",
"{",
"prop",
".",
"setValue",
"(",
"VALUE",
")",
";",
"assertFalse",
"(",
"listener",
".",
"called",
")",
";",
"prop",
".",
"setValue",
"(",
"NEW_VALUE",
")",
";",
"assertTrue",
"(",
"listener",
".",
"called",
")",
";",
"}",
"}",
"</s>"
] |
12,369 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
";",
"import",
"junit",
".",
"framework",
".",
"TestCase",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPConstants",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPTypeFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"ServiceDescriptionBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Property",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"RegistrationData",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ServiceDescription",
";",
"import",
"javax",
".",
"xml",
".",
"namespace",
".",
"QName",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"public",
"class",
"RegistrationInfoTestCase",
"extends",
"TestCase",
"{",
"private",
"RegistrationInfo",
"info",
";",
"private",
"static",
"final",
"String",
"producerId",
"=",
"\"test\"",
";",
"private",
"static",
"final",
"RegistrationContext",
"FAKE_REGISTRATION_CONTEXT",
"=",
"WSRPTypeFactory",
".",
"createRegistrationContext",
"(",
"\"handle\"",
")",
";",
"protected",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"ProducerInfo",
"pi",
"=",
"new",
"ProducerInfo",
"(",
"null",
")",
";",
"info",
"=",
"pi",
".",
"getRegistrationInfo",
"(",
")",
";",
"}",
"public",
"void",
"testInitialState",
"(",
")",
"{",
"assertTrue",
"(",
"info",
".",
"getRegistrationProperties",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"getRegistrationPropertyNames",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
";",
"assertNull",
"(",
"info",
".",
"getRegistrationContext",
"(",
")",
")",
";",
"assertNotNull",
"(",
"info",
".",
"getRegistrationData",
"(",
")",
")",
";",
"assertNull",
"(",
"info",
".",
"getRegistrationHandle",
"(",
")",
")",
";",
"assertNull",
"(",
"info",
".",
"getRegistrationState",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRefreshNeeded",
"(",
")",
")",
";",
"assertNull",
"(",
"info",
".",
"isConsistentWithProducerExpectations",
"(",
")",
")",
";",
"assertNull",
"(",
"info",
".",
"isRegistrationRequired",
"(",
")",
")",
";",
"assertNull",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistered",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifiedSinceLastRefresh",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"try",
"{",
"info",
".",
"isRegistrationDeterminedNotRequired",
"(",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalStateException",
"expected",
")",
"{",
"}",
"try",
"{",
"info",
".",
"isRegistrationDeterminedRequired",
"(",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalStateException",
"expected",
")",
"{",
"}",
"}",
"public",
"void",
"testRegistration",
"(",
")",
"{",
"register",
"(",
")",
";",
"assertEquals",
"(",
"FAKE_REGISTRATION_CONTEXT",
".",
"getRegistrationHandle",
"(",
")",
",",
"info",
".",
"getRegistrationHandle",
"(",
")",
")",
";",
"assertEquals",
"(",
"FAKE_REGISTRATION_CONTEXT",
".",
"getRegistrationState",
"(",
")",
",",
"info",
".",
"getRegistrationState",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistered",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifiedSinceLastRefresh",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isConsistentWithProducerExpectations",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationDeterminedNotRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationDeterminedRequired",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isUndetermined",
"(",
")",
")",
";",
"}",
"public",
"void",
"testIsModifyRegistrationNeeded",
"(",
")",
"{",
"String",
"key",
"=",
"\"foo\"",
";",
"assertFalse",
"(",
"info",
".",
"isRegistered",
"(",
")",
")",
";",
"info",
".",
"setRegistrationPropertyValue",
"(",
"key",
",",
"\"bar\"",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"register",
"(",
")",
";",
"info",
".",
"setRegistrationPropertyValue",
"(",
"key",
",",
"\"bar\"",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifiedSinceLastRefresh",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"info",
".",
"setRegistrationPropertyValue",
"(",
"key",
",",
"\"new\"",
")",
";",
"assertTrue",
"(",
"info",
".",
"isModifiedSinceLastRefresh",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"}",
"private",
"void",
"register",
"(",
")",
"{",
"info",
".",
"setRegistrationContext",
"(",
"FAKE_REGISTRATION_CONTEXT",
")",
";",
"info",
".",
"setConsumerName",
"(",
"WSRPConstants",
".",
"DEFAULT_CONSUMER_NAME",
")",
";",
"}",
"public",
"void",
"testSimpleSetGetRegistrationProperty",
"(",
")",
"{",
"QName",
"key",
"=",
"QName",
".",
"valueOf",
"(",
"\"\"",
")",
";",
"info",
".",
"setRegistrationPropertyValue",
"(",
"key",
",",
"\"bar\"",
")",
";",
"assertNull",
"(",
"info",
".",
"isConsistentWithProducerExpectations",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isModifiedSinceLastRefresh",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"Map",
"properties",
"=",
"info",
".",
"getRegistrationProperties",
"(",
")",
";",
"assertFalse",
"(",
"properties",
".",
"isEmpty",
"(",
")",
")",
";",
"Set",
"names",
"=",
"info",
".",
"getRegistrationPropertyNames",
"(",
")",
";",
"assertFalse",
"(",
"names",
".",
"isEmpty",
"(",
")",
")",
";",
"assertTrue",
"(",
"properties",
".",
"containsKey",
"(",
"key",
")",
")",
";",
"assertTrue",
"(",
"names",
".",
"contains",
"(",
"key",
")",
")",
";",
"Object",
"prop",
"=",
"properties",
".",
"get",
"(",
"key",
")",
";",
"assertNotNull",
"(",
"prop",
")",
";",
"RegistrationProperty",
"registrationProperty",
"=",
"info",
".",
"getRegistrationProperty",
"(",
"key",
")",
";",
"assertEquals",
"(",
"prop",
",",
"registrationProperty",
")",
";",
"assertEquals",
"(",
"\"bar\"",
",",
"registrationProperty",
".",
"getValue",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRegistrationPropertiesAndRefresh",
"(",
")",
"{",
"info",
".",
"setRegistrationPropertyValue",
"(",
"\"prop0\"",
",",
"\"value0\"",
")",
";",
"RefreshResult",
"result",
"=",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"true",
",",
"1",
")",
",",
"producerId",
",",
"true",
",",
"false",
",",
"false",
")",
";",
"RegistrationProperty",
"prop",
"=",
"info",
".",
"getRegistrationProperty",
"(",
"\"prop0\"",
")",
";",
"assertNull",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertFalse",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifiedSinceLastRefresh",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isConsistentWithProducerExpectations",
"(",
")",
")",
";",
"prop",
".",
"setStatus",
"(",
"RegistrationProperty",
".",
"Status",
".",
"VALID",
")",
";",
"info",
".",
"setRegistrationPropertyValue",
"(",
"\"prop0\"",
",",
"\"value1\"",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRefreshNeeded",
"(",
")",
")",
";",
"assertNull",
"(",
"\"\"",
",",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"RegistrationProperty",
".",
"Status",
".",
"UNCHECKED_VALUE",
",",
"prop",
".",
"getStatus",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isModifiedSinceLastRefresh",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRefreshNoRegistration",
"(",
")",
"{",
"ServiceDescription",
"sd",
"=",
"createServiceDescription",
"(",
"false",
",",
"0",
")",
";",
"RefreshResult",
"result",
"=",
"info",
".",
"refresh",
"(",
"sd",
",",
"producerId",
",",
"true",
",",
"false",
",",
"false",
")",
";",
"assertNotNull",
"(",
"result",
")",
";",
"assertFalse",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isConsistentWithProducerExpectations",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationDeterminedNotRequired",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationDeterminedRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"result",
"=",
"info",
".",
"refresh",
"(",
"sd",
",",
"producerId",
",",
"false",
",",
"false",
",",
"false",
")",
";",
"assertNotNull",
"(",
"result",
")",
";",
"assertFalse",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isConsistentWithProducerExpectations",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationDeterminedNotRequired",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationDeterminedRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRefreshRegistrationDefaultRegistrationNoLocalInfo",
"(",
")",
"{",
"assertNull",
"(",
"info",
".",
"isRegistrationRequired",
"(",
")",
")",
";",
"assertNull",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"RegistrationInfo",
".",
"RegistrationRefreshResult",
"result",
"=",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"true",
",",
"0",
")",
",",
"producerId",
",",
"true",
",",
"false",
",",
"false",
")",
";",
"assertNotNull",
"(",
"result",
")",
";",
"assertFalse",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationDeterminedRequired",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationDeterminedNotRequired",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRefreshRegistrationDefaultRegistrationExtraLocalInfo",
"(",
")",
"{",
"info",
".",
"setRegistrationPropertyValue",
"(",
"\"foo\"",
",",
"\"bar\"",
")",
";",
"RegistrationInfo",
".",
"RegistrationRefreshResult",
"result",
"=",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"true",
",",
"0",
")",
",",
"producerId",
",",
"false",
",",
"false",
",",
"true",
")",
";",
"assertNotNull",
"(",
"result",
")",
";",
"assertTrue",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertEquals",
"(",
"RefreshResult",
".",
"Status",
".",
"FAILURE",
",",
"result",
".",
"getStatus",
"(",
")",
")",
";",
"assertEquals",
"(",
"1",
",",
"info",
".",
"getRegistrationProperties",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"1",
",",
"result",
".",
"getRegistrationProperties",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"checkProperties",
"(",
"result",
")",
";",
"}",
"private",
"void",
"checkProperties",
"(",
"RegistrationInfo",
".",
"RegistrationRefreshResult",
"result",
")",
"{",
"Map",
"<",
"QName",
",",
"RegistrationProperty",
">",
"regProps",
"=",
"result",
".",
"getRegistrationProperties",
"(",
")",
";",
"assertNotNull",
"(",
"regProps",
")",
";",
"RegistrationProperty",
"prop",
"=",
"regProps",
".",
"get",
"(",
"QName",
".",
"valueOf",
"(",
"\"foo\"",
")",
")",
";",
"assertNotNull",
"(",
"prop",
")",
";",
"assertEquals",
"(",
"\"bar\"",
",",
"prop",
".",
"getValue",
"(",
")",
")",
";",
"assertTrue",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertEquals",
"(",
"RegistrationProperty",
".",
"Status",
".",
"INEXISTENT",
",",
"prop",
".",
"getStatus",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRefreshRegistrationDefaultRegistrationExtraLocalInfoWhileRegistered",
"(",
")",
"{",
"register",
"(",
")",
";",
"info",
".",
"setRegistrationPropertyValue",
"(",
"\"foo\"",
",",
"\"bar\"",
")",
";",
"RegistrationInfo",
".",
"RegistrationRefreshResult",
"result",
"=",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"true",
",",
"0",
")",
",",
"producerId",
",",
"false",
",",
"false",
",",
"true",
")",
";",
"assertNotNull",
"(",
"result",
")",
";",
"assertEquals",
"(",
"RefreshResult",
".",
"Status",
".",
"MODIFY_REGISTRATION_REQUIRED",
",",
"result",
".",
"getStatus",
"(",
")",
")",
";",
"assertTrue",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertEquals",
"(",
"1",
",",
"info",
".",
"getRegistrationProperties",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"1",
",",
"result",
".",
"getRegistrationProperties",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"checkProperties",
"(",
"result",
")",
";",
"}",
"public",
"void",
"testRefreshRegistrationRegistrationNoLocalInfo",
"(",
")",
"{",
"ServiceDescription",
"sd",
"=",
"createServiceDescription",
"(",
"true",
",",
"2",
")",
";",
"RegistrationInfo",
".",
"RegistrationRefreshResult",
"result",
"=",
"info",
".",
"refresh",
"(",
"sd",
",",
"producerId",
",",
"false",
",",
"false",
",",
"false",
")",
";",
"assertNotNull",
"(",
"result",
")",
";",
"assertTrue",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertEquals",
"(",
"RefreshResult",
".",
"Status",
".",
"FAILURE",
",",
"result",
".",
"getStatus",
"(",
")",
")",
";",
"assertEquals",
"(",
"0",
",",
"info",
".",
"getRegistrationProperties",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"2",
",",
"result",
".",
"getRegistrationProperties",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"Map",
"<",
"QName",
",",
"RegistrationProperty",
">",
"regProps",
"=",
"result",
".",
"getRegistrationProperties",
"(",
")",
";",
"assertNotNull",
"(",
"regProps",
")",
";",
"RegistrationProperty",
"prop",
"=",
"regProps",
".",
"get",
"(",
"QName",
".",
"valueOf",
"(",
"\"prop0\"",
")",
")",
";",
"assertNotNull",
"(",
"prop",
")",
";",
"assertTrue",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertEquals",
"(",
"RegistrationProperty",
".",
"Status",
".",
"MISSING",
",",
"prop",
".",
"getStatus",
"(",
")",
")",
";",
"prop",
"=",
"regProps",
".",
"get",
"(",
"QName",
".",
"valueOf",
"(",
"\"prop1\"",
")",
")",
";",
"assertNotNull",
"(",
"prop",
")",
";",
"assertTrue",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertEquals",
"(",
"RegistrationProperty",
".",
"Status",
".",
"MISSING",
",",
"prop",
".",
"getStatus",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRefreshRegistrationRegistrationNoLocalInfoWhileRegistered",
"(",
")",
"{",
"register",
"(",
")",
";",
"ServiceDescription",
"sd",
"=",
"createServiceDescription",
"(",
"true",
",",
"2",
")",
";",
"RegistrationInfo",
".",
"RegistrationRefreshResult",
"result",
"=",
"info",
".",
"refresh",
"(",
"sd",
",",
"producerId",
",",
"false",
",",
"true",
",",
"false",
")",
";",
"assertNotNull",
"(",
"result",
")",
";",
"assertTrue",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertEquals",
"(",
"RefreshResult",
".",
"Status",
".",
"MODIFY_REGISTRATION_REQUIRED",
",",
"result",
".",
"getStatus",
"(",
")",
")",
";",
"assertEquals",
"(",
"0",
",",
"info",
".",
"getRegistrationProperties",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"2",
",",
"result",
".",
"getRegistrationProperties",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"Map",
"<",
"QName",
",",
"RegistrationProperty",
">",
"regProps",
"=",
"result",
".",
"getRegistrationProperties",
"(",
")",
";",
"assertNotNull",
"(",
"regProps",
")",
";",
"RegistrationProperty",
"prop",
"=",
"regProps",
".",
"get",
"(",
"QName",
".",
"valueOf",
"(",
"\"prop0\"",
")",
")",
";",
"assertNotNull",
"(",
"prop",
")",
";",
"assertTrue",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertEquals",
"(",
"RegistrationProperty",
".",
"Status",
".",
"MISSING",
",",
"prop",
".",
"getStatus",
"(",
")",
")",
";",
"prop",
"=",
"regProps",
".",
"get",
"(",
"QName",
".",
"valueOf",
"(",
"\"prop1\"",
")",
")",
";",
"assertNotNull",
"(",
"prop",
")",
";",
"assertTrue",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertEquals",
"(",
"RegistrationProperty",
".",
"Status",
".",
"MISSING",
",",
"prop",
".",
"getStatus",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRefreshRegistrationRegistrationMergeWithLocalInfo",
"(",
")",
"{",
"info",
".",
"setRegistrationPropertyValue",
"(",
"\"foo\"",
",",
"\"bar\"",
")",
";",
"RegistrationInfo",
".",
"RegistrationRefreshResult",
"result",
"=",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"true",
",",
"2",
")",
",",
"producerId",
",",
"true",
",",
"false",
",",
"false",
")",
";",
"assertNotNull",
"(",
"result",
")",
";",
"assertTrue",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"RegistrationProperty",
"prop",
"=",
"info",
".",
"getRegistrationProperty",
"(",
"\"prop0\"",
")",
";",
"assertNotNull",
"(",
"prop",
")",
";",
"assertNull",
"(",
"prop",
".",
"getValue",
"(",
")",
")",
";",
"assertTrue",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertEquals",
"(",
"RegistrationProperty",
".",
"Status",
".",
"MISSING_VALUE",
",",
"prop",
".",
"getStatus",
"(",
")",
")",
";",
"prop",
"=",
"info",
".",
"getRegistrationProperty",
"(",
"\"prop1\"",
")",
";",
"assertNotNull",
"(",
"prop",
")",
";",
"assertNull",
"(",
"prop",
".",
"getValue",
"(",
")",
")",
";",
"assertTrue",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"assertEquals",
"(",
"RegistrationProperty",
".",
"Status",
".",
"MISSING_VALUE",
",",
"prop",
".",
"getStatus",
"(",
")",
")",
";",
"assertEquals",
"(",
"2",
",",
"info",
".",
"getRegistrationProperties",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"2",
",",
"result",
".",
"getRegistrationProperties",
"(",
")",
".",
"size",
"(",
")",
")",
";",
"assertNull",
"(",
"info",
".",
"getRegistrationProperty",
"(",
"\"foo\"",
")",
")",
";",
"}",
"public",
"void",
"testForceRefreshRegistration",
"(",
")",
"{",
"RefreshResult",
"result",
"=",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"true",
",",
"0",
")",
",",
"producerId",
",",
"false",
",",
"false",
",",
"false",
")",
";",
"assertNotNull",
"(",
"result",
")",
";",
"assertFalse",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"info",
".",
"setRegistrationPropertyValue",
"(",
"\"foo\"",
",",
"\"bar\"",
")",
";",
"result",
"=",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"true",
",",
"0",
")",
",",
"producerId",
",",
"false",
",",
"false",
",",
"false",
")",
";",
"assertTrue",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"info",
".",
"removeRegistrationProperty",
"(",
"\"foo\"",
")",
";",
"result",
"=",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"true",
",",
"0",
")",
",",
"producerId",
",",
"false",
",",
"false",
",",
"false",
")",
";",
"assertFalse",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"result",
"=",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"false",
",",
"0",
")",
",",
"producerId",
",",
"false",
",",
"false",
",",
"false",
")",
";",
"assertFalse",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"result",
"=",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"false",
",",
"0",
")",
",",
"producerId",
",",
"false",
",",
"true",
",",
"false",
")",
";",
"assertFalse",
"(",
"result",
".",
"hasIssues",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"}",
"public",
"void",
"testSetRegistrationContext",
"(",
")",
"{",
"assertNull",
"(",
"info",
".",
"isConsistentWithProducerExpectations",
"(",
")",
")",
";",
"assertNull",
"(",
"info",
".",
"getRegistrationHandle",
"(",
")",
")",
";",
"String",
"registrationHandle",
"=",
"\"\"",
";",
"info",
".",
"setRegistrationContext",
"(",
"WSRPTypeFactory",
".",
"createRegistrationContext",
"(",
"registrationHandle",
")",
")",
";",
"RegistrationContext",
"registrationContext",
"=",
"info",
".",
"getRegistrationContext",
"(",
")",
";",
"assertNotNull",
"(",
"registrationContext",
")",
";",
"assertEquals",
"(",
"registrationHandle",
",",
"registrationContext",
".",
"getRegistrationHandle",
"(",
")",
")",
";",
"assertNull",
"(",
"registrationContext",
".",
"getRegistrationState",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isConsistentWithProducerExpectations",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRefreshNeeded",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationDeterminedRequired",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationDeterminedNotRequired",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"}",
"public",
"void",
"testGetRegistrationData",
"(",
")",
"{",
"assertNotNull",
"(",
"info",
".",
"getRegistrationData",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifiedSinceLastRefresh",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"info",
".",
"setRegistrationPropertyValue",
"(",
"\"prop0\"",
",",
"\"value0\"",
")",
";",
"assertTrue",
"(",
"info",
".",
"isModifiedSinceLastRefresh",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"RegistrationData",
"registrationData",
"=",
"info",
".",
"getRegistrationData",
"(",
")",
";",
"checkRegistrationData",
"(",
"registrationData",
",",
"\"value0\"",
")",
";",
"info",
".",
"setRegistrationPropertyValue",
"(",
"\"prop0\"",
",",
"\"value1\"",
")",
";",
"assertTrue",
"(",
"info",
".",
"isModifiedSinceLastRefresh",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"register",
"(",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifiedSinceLastRefresh",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifyRegistrationNeeded",
"(",
")",
")",
";",
"List",
"<",
"Property",
">",
"properties",
"=",
"info",
".",
"getRegistrationData",
"(",
")",
".",
"getRegistrationProperties",
"(",
")",
";",
"assertEquals",
"(",
"\"value1\"",
",",
"properties",
".",
"get",
"(",
"0",
")",
".",
"getStringValue",
"(",
")",
")",
";",
"}",
"public",
"void",
"testGetRegistrationDataWithInitialWrongValue",
"(",
")",
"{",
"info",
".",
"setRegistrationPropertyValue",
"(",
"\"prop0\"",
",",
"\"incorrect\"",
")",
";",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"true",
",",
"1",
")",
",",
"producerId",
",",
"true",
",",
"true",
",",
"false",
")",
";",
"checkRegistrationData",
"(",
"info",
".",
"getRegistrationData",
"(",
")",
",",
"\"incorrect\"",
")",
";",
"info",
".",
"setRegistrationPropertyValue",
"(",
"\"prop0\"",
",",
"\"value0\"",
")",
";",
"RefreshResult",
"res",
"=",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"true",
",",
"1",
")",
",",
"producerId",
",",
"true",
",",
"true",
",",
"false",
")",
";",
"assertFalse",
"(",
"res",
".",
"hasIssues",
"(",
")",
")",
";",
"checkRegistrationData",
"(",
"info",
".",
"getRegistrationData",
"(",
")",
",",
"\"value0\"",
")",
";",
"}",
"public",
"void",
"testRefreshWhileRegisteredAndProducerNotSendingPropertyDescriptions",
"(",
")",
"{",
"info",
".",
"setRegistrationPropertyValue",
"(",
"\"prop0\"",
",",
"\"value0\"",
")",
";",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"true",
",",
"1",
")",
",",
"producerId",
",",
"true",
",",
"true",
",",
"false",
")",
";",
"info",
".",
"setRegistrationContext",
"(",
"FAKE_REGISTRATION_CONTEXT",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"ServiceDescription",
"description",
"=",
"createServiceDescription",
"(",
"true",
",",
"0",
")",
";",
"info",
".",
"refresh",
"(",
"description",
",",
"producerId",
",",
"true",
",",
"true",
",",
"false",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"RegistrationProperty",
"prop",
"=",
"info",
".",
"getRegistrationProperty",
"(",
"\"prop0\"",
")",
";",
"assertNotNull",
"(",
"prop",
")",
";",
"assertFalse",
"(",
"prop",
".",
"isInvalid",
"(",
")",
")",
";",
"info",
".",
"refresh",
"(",
"description",
",",
"producerId",
",",
"true",
",",
"true",
",",
"true",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"assertNull",
"(",
"info",
".",
"getRegistrationProperty",
"(",
"\"prop0\"",
")",
")",
";",
"}",
"public",
"void",
"testRefreshRegisteredWithoutPropsAndProducerNowSendsProps",
"(",
")",
"{",
"info",
".",
"setRegistrationContext",
"(",
"FAKE_REGISTRATION_CONTEXT",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"info",
".",
"refresh",
"(",
"createServiceDescription",
"(",
"true",
",",
"1",
")",
",",
"producerId",
",",
"true",
",",
"true",
",",
"true",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationRequired",
"(",
")",
")",
";",
"assertTrue",
"(",
"info",
".",
"isRegistrationDeterminedRequired",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isRegistrationValid",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isConsistentWithProducerExpectations",
"(",
")",
")",
";",
"assertFalse",
"(",
"info",
".",
"isModifiedSinceLastRefresh",
"(",
")",
")",
";",
"}",
"private",
"void",
"checkRegistrationData",
"(",
"RegistrationData",
"registrationData",
",",
"String",
"prop0Value",
")",
"{",
"assertNotNull",
"(",
"registrationData",
")",
";",
"List",
"<",
"Property",
">",
"properties",
"=",
"registrationData",
".",
"getRegistrationProperties",
"(",
")",
";",
"assertNotNull",
"(",
"properties",
")",
";",
"assertEquals",
"(",
"1",
",",
"properties",
".",
"size",
"(",
")",
")",
";",
"Property",
"property",
"=",
"properties",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"\"prop0\"",
",",
"property",
".",
"getName",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"assertEquals",
"(",
"prop0Value",
",",
"property",
".",
"getStringValue",
"(",
")",
")",
";",
"}",
"private",
"ServiceDescription",
"createServiceDescription",
"(",
"boolean",
"requiresRegistration",
",",
"int",
"numberOfProperties",
")",
"{",
"return",
"ServiceDescriptionBehavior",
".",
"createServiceDescription",
"(",
"requiresRegistration",
",",
"numberOfProperties",
")",
";",
"}",
"}",
"</s>"
] |
12,370 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"migration",
";",
"import",
"junit",
".",
"framework",
".",
"TestCase",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"TreeMap",
";",
"public",
"class",
"MigrationServiceTestCase",
"extends",
"TestCase",
"{",
"private",
"MigrationService",
"service",
";",
"@",
"Override",
"protected",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"service",
"=",
"new",
"InMemoryMigrationService",
"(",
")",
";",
"}",
"public",
"void",
"testIsAvailableExportInfosEmpty",
"(",
")",
"{",
"assertTrue",
"(",
"service",
".",
"isAvailableExportInfosEmpty",
"(",
")",
")",
";",
"}",
"public",
"void",
"testAddExport",
"(",
")",
"{",
"ExportInfo",
"info",
"=",
"new",
"ExportInfo",
"(",
"System",
".",
"currentTimeMillis",
"(",
")",
",",
"null",
",",
"new",
"TreeMap",
"<",
"String",
",",
"byte",
"[",
"]",
">",
"(",
")",
",",
"null",
")",
";",
"service",
".",
"add",
"(",
"info",
")",
";",
"List",
"<",
"ExportInfo",
">",
"exports",
"=",
"service",
".",
"getAvailableExportInfos",
"(",
")",
";",
"assertNotNull",
"(",
"exports",
")",
";",
"assertEquals",
"(",
"1",
",",
"exports",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"info",
",",
"exports",
".",
"get",
"(",
"0",
")",
")",
";",
"assertEquals",
"(",
"info",
",",
"service",
".",
"getExportInfo",
"(",
"info",
".",
"getExportTime",
"(",
")",
")",
")",
";",
"assertFalse",
"(",
"service",
".",
"isAvailableExportInfosEmpty",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
12,371 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Portlet",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletInvokerException",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"java",
".",
"util",
".",
"HashSet",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"public",
"class",
"InteropServiceDescriptionTestCase",
"extends",
"V2ConsumerBaseTest",
"{",
"public",
"InteropServiceDescriptionTestCase",
"(",
")",
"throws",
"Exception",
"{",
"super",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"setStrict",
"(",
"false",
")",
";",
"super",
".",
"setUp",
"(",
")",
";",
"}",
"public",
"void",
"testUsesRelaxedMode",
"(",
")",
"{",
"ExtendedAssert",
".",
"assertFalse",
"(",
"isStrict",
"(",
")",
")",
";",
"}",
"public",
"void",
"testGetPortlets",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"Set",
"returnedPortlets",
"=",
"consumer",
".",
"getPortlets",
"(",
")",
";",
"int",
"portletNumber",
"=",
"returnedPortlets",
".",
"size",
"(",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"getPortletNumber",
"(",
")",
",",
"portletNumber",
")",
";",
"Set",
"<",
"String",
">",
"handles",
"=",
"getPortletHandles",
"(",
")",
";",
"Set",
"<",
"String",
">",
"consumerHandles",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
"portletNumber",
")",
";",
"for",
"(",
"Object",
"o",
":",
"returnedPortlets",
")",
"{",
"Portlet",
"portlet",
"=",
"(",
"Portlet",
")",
"o",
";",
"consumerHandles",
".",
"add",
"(",
"portlet",
".",
"getContext",
"(",
")",
".",
"getId",
"(",
")",
")",
";",
"}",
"ExtendedAssert",
".",
"assertTrue",
"(",
"handles",
".",
"containsAll",
"(",
"consumerHandles",
")",
")",
";",
"}",
"@",
"Override",
"protected",
"void",
"registerAdditionalMarkupBehaviors",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"}",
"}",
"</s>"
] |
12,372 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"protocol",
".",
"v2",
";",
"import",
"junit",
".",
"framework",
".",
"TestCase",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"EndpointConfigurationInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"ProducerInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"WSRPConsumerImpl",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"spec",
".",
"v2",
".",
"WSRP2Constants",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorBackedServiceFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"PortletManagementBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"RegistrationBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"ServiceDescriptionBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"TestProducerBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"TestWSRPProducer",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"TestWSRPProducerImpl",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"BasicMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"BasicPortletManagementBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"BasicServiceDescriptionBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"EmptyMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"ExtensionMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"InitCookieNotRequiredMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"NullMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"PerGroupInitCookieMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"PerUserInitCookieMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"ResourceMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"SessionMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"MockConsumerRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"RequestedMarkupBehavior",
";",
"import",
"org",
".",
"slf4j",
".",
"Logger",
";",
"import",
"org",
".",
"slf4j",
".",
"LoggerFactory",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"public",
"abstract",
"class",
"WSRP2ConsumerBaseTest",
"extends",
"TestCase",
"{",
"private",
"static",
"Logger",
"log",
"=",
"LoggerFactory",
".",
"getLogger",
"(",
"WSRP2ConsumerBaseTest",
".",
"class",
")",
";",
"private",
"static",
"final",
"String",
"TEST_PRODUCER_ID",
"=",
"\"\"",
";",
"protected",
"TestWSRPProducer",
"producer",
"=",
"new",
"TestWSRPProducerImpl",
"(",
")",
";",
"protected",
"WSRPConsumerImpl",
"consumer",
"=",
"new",
"WSRPConsumerImpl",
"(",
"new",
"ProducerInfo",
"(",
"new",
"MockConsumerRegistry",
"(",
")",
")",
")",
";",
"private",
"boolean",
"strict",
"=",
"true",
";",
"public",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"producer",
".",
"reset",
"(",
")",
";",
"ProducerInfo",
"producerInfo",
"=",
"consumer",
".",
"getProducerInfo",
"(",
")",
";",
"producerInfo",
".",
"setId",
"(",
"TEST_PRODUCER_ID",
")",
";",
"producerInfo",
".",
"setSupportedOption",
"(",
"WSRP2Constants",
".",
"OPTIONS_EXPORT",
")",
";",
"producerInfo",
".",
"setSupportedOption",
"(",
"WSRP2Constants",
".",
"OPTIONS_IMPORT",
")",
";",
"BehaviorRegistry",
"registry",
"=",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
";",
"setServiceDescriptionBehavior",
"(",
"null",
")",
";",
"setPortletManagementBehavior",
"(",
"null",
")",
";",
"setRegistrationBehavior",
"(",
"null",
")",
";",
"registerAdditionalMarkupBehaviors",
"(",
"registry",
")",
";",
"producerInfo",
".",
"setEndpointConfigurationInfo",
"(",
"new",
"EndpointConfigurationInfo",
"(",
"new",
"BehaviorBackedServiceFactory",
"(",
"registry",
")",
")",
")",
";",
"producerInfo",
".",
"setExpirationCacheSeconds",
"(",
"null",
")",
";",
"consumer",
".",
"refreshProducerInfo",
"(",
")",
";",
"producerInfo",
".",
"setExpirationCacheSeconds",
"(",
"120",
")",
";",
"}",
"protected",
"void",
"setRegistrationBehavior",
"(",
"RegistrationBehavior",
"behavior",
")",
"{",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
".",
"setRegistrationBehavior",
"(",
"behavior",
")",
";",
"}",
"protected",
"void",
"setServiceDescriptionBehavior",
"(",
"ServiceDescriptionBehavior",
"behavior",
")",
"{",
"if",
"(",
"behavior",
"==",
"null",
")",
"{",
"log",
".",
"debug",
"(",
"\"\"",
")",
";",
"behavior",
"=",
"new",
"BasicServiceDescriptionBehavior",
"(",
")",
";",
"}",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"behavior",
")",
";",
"}",
"protected",
"void",
"setPortletManagementBehavior",
"(",
"PortletManagementBehavior",
"behavior",
")",
"{",
"BehaviorRegistry",
"registry",
"=",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
";",
"if",
"(",
"behavior",
"==",
"null",
")",
"{",
"log",
".",
"debug",
"(",
"\"\"",
")",
";",
"behavior",
"=",
"new",
"BasicPortletManagementBehavior",
"(",
"registry",
")",
";",
"}",
"registry",
".",
"setPortletManagementBehavior",
"(",
"behavior",
")",
";",
"}",
"public",
"void",
"testProducerId",
"(",
")",
"{",
"ExtendedAssert",
".",
"assertEquals",
"(",
"TEST_PRODUCER_ID",
",",
"consumer",
".",
"getProducerId",
"(",
")",
")",
";",
"}",
"public",
"void",
"setStrict",
"(",
"boolean",
"strict",
")",
"{",
"this",
".",
"strict",
"=",
"strict",
";",
"producer",
".",
"usingStrictModeChangedTo",
"(",
"strict",
")",
";",
"}",
"public",
"boolean",
"isStrict",
"(",
")",
"{",
"return",
"strict",
";",
"}",
"private",
"<",
"T",
"extends",
"TestProducerBehavior",
">",
"T",
"createBehavior",
"(",
"String",
"behaviorClassName",
",",
"Class",
"<",
"T",
">",
"expectedBehaviorClass",
")",
"{",
"if",
"(",
"behaviorClassName",
"!=",
"null",
")",
"{",
"try",
"{",
"Class",
"behaviorClass",
"=",
"getClass",
"(",
")",
".",
"getClassLoader",
"(",
")",
".",
"loadClass",
"(",
"behaviorClassName",
")",
";",
"if",
"(",
"expectedBehaviorClass",
".",
"isAssignableFrom",
"(",
"behaviorClass",
")",
")",
"{",
"return",
"expectedBehaviorClass",
".",
"cast",
"(",
"behaviorClass",
".",
"newInstance",
"(",
")",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"behaviorClassName",
"+",
"\"",
"is",
"not",
"a",
"\"",
"+",
"expectedBehaviorClass",
".",
"getSimpleName",
"(",
")",
")",
";",
"}",
"}",
"catch",
"(",
"ClassNotFoundException",
"e",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"behaviorClassName",
",",
"e",
")",
";",
"}",
"catch",
"(",
"IllegalAccessException",
"e",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"behaviorClassName",
",",
"e",
")",
";",
"}",
"catch",
"(",
"InstantiationException",
"e",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"behaviorClassName",
",",
"e",
")",
";",
"}",
"}",
"return",
"null",
";",
"}",
"protected",
"void",
"registerAdditionalMarkupBehaviors",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"BasicMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"EmptyMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"InitCookieNotRequiredMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"PerGroupInitCookieMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"PerUserInitCookieMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"NullMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"SessionMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"ResourceMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"ExtensionMarkupBehavior",
"(",
"registry",
")",
")",
";",
"}",
"protected",
"Set",
"<",
"String",
">",
"getPortletHandles",
"(",
")",
"{",
"return",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
".",
"getServiceDescriptionBehavior",
"(",
")",
".",
"getPortletHandles",
"(",
")",
";",
"}",
"protected",
"int",
"getPortletNumber",
"(",
")",
"{",
"return",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
".",
"getServiceDescriptionBehavior",
"(",
")",
".",
"getPortletNumber",
"(",
")",
";",
"}",
"@",
"Override",
"protected",
"void",
"tearDown",
"(",
")",
"throws",
"Exception",
"{",
"RequestedMarkupBehavior",
".",
"setRequestedMarkupBehavior",
"(",
"null",
")",
";",
"}",
"}",
"</s>"
] |
12,373 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Portlet",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletInvokerException",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"ProducerInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"BasicMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"SessionMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"ServiceDescriptionBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"GroupedPortletsServiceDescriptionBehavior",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"CookieProtocol",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"EventDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ItemDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelTypes",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"ServiceDescriptionTestCase",
"extends",
"InteropServiceDescriptionTestCase",
"{",
"public",
"ServiceDescriptionTestCase",
"(",
")",
"throws",
"Exception",
"{",
"super",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"super",
".",
"setUp",
"(",
")",
";",
"setStrict",
"(",
"true",
")",
";",
"}",
"public",
"void",
"testUsesRelaxedMode",
"(",
")",
"{",
"ExtendedAssert",
".",
"assertTrue",
"(",
"isStrict",
"(",
")",
")",
";",
"}",
"public",
"void",
"testGetPortlet",
"(",
")",
"throws",
"Exception",
"{",
"Portlet",
"portlet",
"=",
"consumer",
".",
"getPortlet",
"(",
"PortletContext",
".",
"createPortletContext",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
")",
";",
"checkPortlet",
"(",
"portlet",
",",
"\"\"",
",",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"portlet",
"=",
"consumer",
".",
"getPortlet",
"(",
"PortletContext",
".",
"createPortletContext",
"(",
"SessionMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
")",
";",
"checkPortlet",
"(",
"portlet",
",",
"\"2\"",
",",
"SessionMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"}",
"public",
"void",
"testRequiresInitCookieIsProperlySetOnConsumerInitiatedRefresh",
"(",
")",
"throws",
"OperationFailed",
",",
"ResourceSuspended",
",",
"ModifyRegistrationRequired",
",",
"InvalidRegistration",
",",
"PortletInvokerException",
"{",
"BehaviorRegistry",
"registry",
"=",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
";",
"Holder",
"<",
"List",
"<",
"PortletDescription",
">",
">",
"offeredPortlets",
"=",
"new",
"Holder",
"<",
"List",
"<",
"PortletDescription",
">",
">",
"(",
")",
";",
"registry",
".",
"getServiceDescriptionBehavior",
"(",
")",
".",
"getServiceDescription",
"(",
"null",
",",
"null",
",",
"null",
",",
"null",
",",
"new",
"Holder",
"<",
"Boolean",
">",
"(",
")",
",",
"offeredPortlets",
",",
"new",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"(",
")",
",",
"null",
",",
"new",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"CookieProtocol",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"ModelDescription",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"ResourceList",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"EventDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"ModelTypes",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"ExportDescription",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"Boolean",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"(",
")",
")",
";",
"setServiceDescriptionBehavior",
"(",
"new",
"GroupedPortletsServiceDescriptionBehavior",
"(",
"offeredPortlets",
".",
"value",
")",
")",
";",
"ServiceDescriptionBehavior",
"sdb",
"=",
"new",
"GroupedPortletsServiceDescriptionBehavior",
"(",
"offeredPortlets",
".",
"value",
")",
";",
"sdb",
".",
"setRequiresInitCookie",
"(",
"CookieProtocol",
".",
"PER_GROUP",
")",
";",
"setServiceDescriptionBehavior",
"(",
"sdb",
")",
";",
"consumer",
".",
"refreshProducerInfo",
"(",
")",
";",
"ProducerInfo",
"producerInfo",
"=",
"consumer",
".",
"getProducerInfo",
"(",
")",
";",
"assertEquals",
"(",
"CookieProtocol",
".",
"PER_GROUP",
",",
"producerInfo",
".",
"getRequiresInitCookie",
"(",
")",
")",
";",
"assertTrue",
"(",
"consumer",
".",
"getSessionHandler",
"(",
")",
".",
"requiresInitCookie",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRequiresInitCookieIsProperlySetOnProducerInfoInitiatedRefresh",
"(",
")",
"throws",
"OperationFailed",
",",
"ResourceSuspended",
",",
"ModifyRegistrationRequired",
",",
"InvalidRegistration",
",",
"PortletInvokerException",
"{",
"BehaviorRegistry",
"registry",
"=",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
";",
"Holder",
"<",
"List",
"<",
"PortletDescription",
">",
">",
"offeredPortlets",
"=",
"new",
"Holder",
"<",
"List",
"<",
"PortletDescription",
">",
">",
"(",
")",
";",
"registry",
".",
"getServiceDescriptionBehavior",
"(",
")",
".",
"getServiceDescription",
"(",
"null",
",",
"null",
",",
"null",
",",
"null",
",",
"new",
"Holder",
"<",
"Boolean",
">",
"(",
")",
",",
"offeredPortlets",
",",
"new",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"(",
")",
",",
"null",
",",
"new",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"CookieProtocol",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"ModelDescription",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"ResourceList",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"EventDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"ModelTypes",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"ExportDescription",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"Boolean",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"(",
")",
")",
";",
"setServiceDescriptionBehavior",
"(",
"new",
"GroupedPortletsServiceDescriptionBehavior",
"(",
"offeredPortlets",
".",
"value",
")",
")",
";",
"ServiceDescriptionBehavior",
"sdb",
"=",
"new",
"GroupedPortletsServiceDescriptionBehavior",
"(",
"offeredPortlets",
".",
"value",
")",
";",
"sdb",
".",
"setRequiresInitCookie",
"(",
"CookieProtocol",
".",
"PER_GROUP",
")",
";",
"setServiceDescriptionBehavior",
"(",
"sdb",
")",
";",
"consumer",
".",
"getProducerInfo",
"(",
")",
".",
"refresh",
"(",
"true",
")",
";",
"ProducerInfo",
"producerInfo",
"=",
"consumer",
".",
"getProducerInfo",
"(",
")",
";",
"assertEquals",
"(",
"CookieProtocol",
".",
"PER_GROUP",
",",
"producerInfo",
".",
"getRequiresInitCookie",
"(",
")",
")",
";",
"assertTrue",
"(",
"consumer",
".",
"getSessionHandler",
"(",
")",
".",
"requiresInitCookie",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
12,374 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Portlet",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletInvokerException",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletStateType",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"info",
".",
"MetaInfo",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"state",
".",
"DestroyCloneFailure",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"state",
".",
"PropertyChange",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"state",
".",
"PropertyMap",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"migration",
".",
"ExportInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"BasicMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"BasicPortletManagementBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"DestroyClonesPortletManagementBehavior",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Collections",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"PortletManagementTestCase",
"extends",
"V2ConsumerBaseTest",
"{",
"public",
"PortletManagementTestCase",
"(",
")",
"throws",
"Exception",
"{",
"}",
"public",
"void",
"testClone",
"(",
")",
"throws",
"Exception",
"{",
"PortletContext",
"original",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
";",
"PortletContext",
"clone",
"=",
"consumer",
".",
"createClone",
"(",
"PortletStateType",
".",
"OPAQUE",
",",
"original",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"clone",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"original",
".",
"equals",
"(",
"clone",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"BasicPortletManagementBehavior",
".",
"CLONED_HANDLE",
",",
"clone",
".",
"getId",
"(",
")",
")",
";",
"Portlet",
"originalPortlet",
"=",
"consumer",
".",
"getPortlet",
"(",
"original",
")",
";",
"Portlet",
"clonePortlet",
"=",
"consumer",
".",
"getPortlet",
"(",
"clone",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"clonePortlet",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"originalPortlet",
".",
"getContext",
"(",
")",
".",
"equals",
"(",
"clonePortlet",
".",
"getContext",
"(",
")",
")",
")",
";",
"MetaInfo",
"originalInfo",
"=",
"originalPortlet",
".",
"getInfo",
"(",
")",
".",
"getMeta",
"(",
")",
";",
"MetaInfo",
"cloneInfo",
"=",
"clonePortlet",
".",
"getInfo",
"(",
")",
".",
"getMeta",
"(",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"originalInfo",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"TITLE",
")",
",",
"cloneInfo",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"TITLE",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"originalInfo",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"DESCRIPTION",
")",
",",
"cloneInfo",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"DESCRIPTION",
")",
")",
";",
"}",
"public",
"void",
"testGetSetProperties",
"(",
")",
"throws",
"Exception",
"{",
"PortletContext",
"original",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
";",
"PropertyMap",
"props",
"=",
"consumer",
".",
"getProperties",
"(",
"original",
")",
";",
"checkProperties",
"(",
"props",
",",
"BasicPortletManagementBehavior",
".",
"PROPERTY_VALUE",
")",
";",
"PortletContext",
"clone",
"=",
"consumer",
".",
"createClone",
"(",
"PortletStateType",
".",
"OPAQUE",
",",
"original",
")",
";",
"props",
"=",
"consumer",
".",
"getProperties",
"(",
"clone",
")",
";",
"checkProperties",
"(",
"props",
",",
"BasicPortletManagementBehavior",
".",
"PROPERTY_VALUE",
")",
";",
"consumer",
".",
"setProperties",
"(",
"clone",
",",
"new",
"PropertyChange",
"[",
"]",
"{",
"PropertyChange",
".",
"newUpdate",
"(",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NAME",
",",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NEW_VALUE",
")",
"}",
")",
";",
"checkProperties",
"(",
"consumer",
".",
"getProperties",
"(",
"clone",
")",
",",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NEW_VALUE",
")",
";",
"consumer",
".",
"setProperties",
"(",
"clone",
",",
"new",
"PropertyChange",
"[",
"]",
"{",
"PropertyChange",
".",
"newReset",
"(",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NAME",
")",
"}",
")",
";",
"checkProperties",
"(",
"consumer",
".",
"getProperties",
"(",
"clone",
")",
",",
"BasicPortletManagementBehavior",
".",
"PROPERTY_VALUE",
")",
";",
"}",
"public",
"void",
"testSetResetSameProperty",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"PortletContext",
"original",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
";",
"PortletContext",
"clone",
"=",
"consumer",
".",
"createClone",
"(",
"PortletStateType",
".",
"OPAQUE",
",",
"original",
")",
";",
"try",
"{",
"consumer",
".",
"setProperties",
"(",
"clone",
",",
"new",
"PropertyChange",
"[",
"]",
"{",
"PropertyChange",
".",
"newUpdate",
"(",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NAME",
",",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NEW_VALUE",
")",
",",
"PropertyChange",
".",
"newReset",
"(",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NAME",
")",
"}",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"assertTrue",
"(",
"e",
".",
"getCause",
"(",
")",
".",
"getLocalizedMessage",
"(",
")",
".",
"contains",
"(",
"BasicPortletManagementBehavior",
".",
"CANNOT_BOTH_SET_AND_RESET_A_PROPERTY_AT_THE_SAME_TIME",
")",
")",
";",
"}",
"}",
"private",
"void",
"checkProperties",
"(",
"PropertyMap",
"props",
",",
"String",
"expectedValue",
")",
"{",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"props",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"1",
",",
"props",
".",
"size",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"expectedValue",
",",
"props",
".",
"getProperty",
"(",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NAME",
")",
".",
"get",
"(",
"0",
")",
")",
";",
"}",
"public",
"void",
"testDestroyClones",
"(",
")",
"throws",
"Exception",
"{",
"BehaviorRegistry",
"behaviorRegistry",
"=",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
";",
"behaviorRegistry",
".",
"setPortletManagementBehavior",
"(",
"new",
"DestroyClonesPortletManagementBehavior",
"(",
"behaviorRegistry",
")",
")",
";",
"PortletContext",
"original",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
";",
"PortletContext",
"clone",
"=",
"consumer",
".",
"createClone",
"(",
"PortletStateType",
".",
"OPAQUE",
",",
"original",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"clone",
")",
";",
"Portlet",
"portlet",
"=",
"consumer",
".",
"getPortlet",
"(",
"clone",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"portlet",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"BasicPortletManagementBehavior",
".",
"CLONED_HANDLE",
",",
"portlet",
".",
"getContext",
"(",
")",
".",
"getId",
"(",
")",
")",
";",
"List",
"clones",
"=",
"new",
"ArrayList",
"(",
"1",
")",
";",
"clones",
".",
"add",
"(",
"clone",
")",
";",
"List",
"result",
"=",
"consumer",
".",
"destroyClones",
"(",
"clones",
")",
";",
"ExtendedAssert",
".",
"assertTrue",
"(",
"result",
".",
"isEmpty",
"(",
")",
")",
";",
"try",
"{",
"consumer",
".",
"getPortlet",
"(",
"clone",
")",
";",
"ExtendedAssert",
".",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"PortletInvokerException",
"expected",
")",
"{",
"}",
"clone",
"=",
"consumer",
".",
"createClone",
"(",
"PortletStateType",
".",
"OPAQUE",
",",
"original",
")",
";",
"PortletContext",
"invalidContext",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"\"invalid\"",
",",
"false",
")",
";",
"clones",
".",
"add",
"(",
"invalidContext",
")",
";",
"result",
"=",
"consumer",
".",
"destroyClones",
"(",
"clones",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"1",
",",
"result",
".",
"size",
"(",
")",
")",
";",
"DestroyCloneFailure",
"failure",
"=",
"(",
"DestroyCloneFailure",
")",
"result",
".",
"get",
"(",
"0",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"\"invalid\"",
",",
"failure",
".",
"getPortletId",
"(",
")",
")",
";",
"try",
"{",
"consumer",
".",
"getPortlet",
"(",
"clone",
")",
";",
"ExtendedAssert",
".",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"PortletInvokerException",
"expected",
")",
"{",
"}",
"}",
"public",
"void",
"testInvalidSetProperties",
"(",
")",
"throws",
"Exception",
"{",
"PortletContext",
"original",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
";",
"try",
"{",
"consumer",
".",
"setProperties",
"(",
"original",
",",
"null",
")",
";",
"ExtendedAssert",
".",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"expected",
")",
"{",
"}",
"}",
"public",
"void",
"testNullExportPortlets",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"try",
"{",
"consumer",
".",
"exportPortlets",
"(",
"null",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"e",
")",
"{",
"}",
"}",
"public",
"void",
"testEmptyExportPortlets",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"try",
"{",
"consumer",
".",
"exportPortlets",
"(",
"Collections",
".",
"<",
"String",
">",
"emptyList",
"(",
")",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"e",
")",
"{",
"}",
"}",
"public",
"void",
"testExportPortlets",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"long",
"now",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"ArrayList",
"<",
"String",
">",
"portletContexts",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"portletContexts",
".",
"add",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"ExportInfo",
"ei",
"=",
"consumer",
".",
"exportPortlets",
"(",
"portletContexts",
")",
";",
"assertNotNull",
"(",
"ei",
")",
";",
"long",
"tenSeconds",
"=",
"10",
"*",
"1000",
";",
"assertTrue",
"(",
"(",
"ei",
".",
"getExportTime",
"(",
")",
"-",
"now",
")",
"<",
"tenSeconds",
")",
";",
"assertEquals",
"(",
"0",
",",
"ei",
".",
"getExpirationTime",
"(",
")",
")",
";",
"List",
"<",
"String",
">",
"exportedPortlets",
"=",
"ei",
".",
"getExportedPortletHandles",
"(",
")",
";",
"assertNotNull",
"(",
"exportedPortlets",
")",
";",
"assertEquals",
"(",
"1",
",",
"exportedPortlets",
".",
"size",
"(",
")",
")",
";",
"assertTrue",
"(",
"exportedPortlets",
".",
"contains",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
")",
";",
"assertNotNull",
"(",
"ei",
".",
"getPortletStateFor",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
")",
";",
"assertTrue",
"(",
"ei",
".",
"getErrorCodesToFailedPortletHandlesMapping",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
";",
"List",
"<",
"ExportInfo",
">",
"availableExportInfos",
"=",
"consumer",
".",
"getMigrationService",
"(",
")",
".",
"getAvailableExportInfos",
"(",
")",
";",
"assertEquals",
"(",
"1",
",",
"availableExportInfos",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"ei",
",",
"availableExportInfos",
".",
"get",
"(",
"0",
")",
")",
";",
"}",
"}",
"</s>"
] |
12,375 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Portlet",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"info",
".",
"MetaInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"TestProducerBehavior",
";",
"public",
"class",
"V2ConsumerBaseTest",
"extends",
"WSRP2ConsumerBaseTest",
"{",
"public",
"V2ConsumerBaseTest",
"(",
")",
"throws",
"Exception",
"{",
"}",
"protected",
"void",
"checkPortlet",
"(",
"Portlet",
"portlet",
",",
"String",
"suffix",
",",
"String",
"handle",
")",
"{",
"MetaInfo",
"meta",
"=",
"portlet",
".",
"getInfo",
"(",
")",
".",
"getMeta",
"(",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"handle",
",",
"portlet",
".",
"getContext",
"(",
")",
".",
"getId",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"TestProducerBehavior",
".",
"SAMPLE_DESCRIPTION",
"+",
"suffix",
",",
"TestProducerBehavior",
".",
"extractString",
"(",
"meta",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"DESCRIPTION",
")",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"TestProducerBehavior",
".",
"SAMPLE_TITLE",
"+",
"suffix",
",",
"TestProducerBehavior",
".",
"extractString",
"(",
"meta",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"TITLE",
")",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"TestProducerBehavior",
".",
"SAMPLE_SHORTTITLE",
"+",
"suffix",
",",
"TestProducerBehavior",
".",
"extractString",
"(",
"meta",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"SHORT_TITLE",
")",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"TestProducerBehavior",
".",
"SAMPLE_DISPLAYNAME",
"+",
"suffix",
",",
"TestProducerBehavior",
".",
"extractString",
"(",
"meta",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"DISPLAY_NAME",
")",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"TestProducerBehavior",
".",
"SAMPLE_KEYWORD",
"+",
"suffix",
",",
"TestProducerBehavior",
".",
"extractString",
"(",
"meta",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"KEYWORDS",
")",
")",
")",
";",
"}",
"public",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"super",
".",
"setUp",
"(",
")",
";",
"}",
"}",
"</s>"
] |
12,376 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"protocol",
".",
"v2",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"OpaqueStateString",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletInvokerException",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"ActionInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"PortletInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"RenderInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"response",
".",
"ErrorResponse",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"response",
".",
"FragmentResponse",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"response",
".",
"PortletInvocationResponse",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"response",
".",
"UpdateNavigationalStateResponse",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractInstanceContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractPortalContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractSecurityContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractUserContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractWindowContext",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPResourceURL",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"api",
".",
"extensions",
".",
"ExtensionAccess",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"api",
".",
"extensions",
".",
"InvocationHandlerDelegate",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"api",
".",
"extensions",
".",
"UnmarshalledExtension",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"handlers",
".",
"ProducerSessionInformation",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"payload",
".",
"PayloadUtils",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"BasicMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"EmptyMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"ExtensionMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"GroupedPortletsServiceDescriptionBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"InitCookieMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"InitCookieNotRequiredMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"NullMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"PerGroupInitCookieMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"PerUserInitCookieMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"ResourceMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v2",
".",
"behaviors",
".",
"SessionMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"MockHttpServletRequest",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"RequestedMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"TestPortletInvocationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"BlockingInteractionResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"CookieProtocol",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"EventDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ExportDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InteractionParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ItemDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupParams",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"MarkupResponse",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModelTypes",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ModifyRegistrationRequired",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceList",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
".",
"ResourceSuspended",
";",
"import",
"org",
".",
"w3c",
".",
"dom",
".",
"Element",
";",
"import",
"org",
".",
"w3c",
".",
"dom",
".",
"Node",
";",
"import",
"javax",
".",
"servlet",
".",
"http",
".",
"HttpSession",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"net",
".",
"MalformedURLException",
";",
"import",
"java",
".",
"net",
".",
"URL",
";",
"import",
"java",
".",
"util",
".",
"Collections",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Locale",
";",
"public",
"class",
"MarkupTestCase",
"extends",
"V2ConsumerBaseTest",
"{",
"public",
"MarkupTestCase",
"(",
")",
"throws",
"Exception",
"{",
"super",
"(",
")",
";",
"}",
"@",
"Override",
"protected",
"void",
"tearDown",
"(",
")",
"throws",
"Exception",
"{",
"InvocationHandlerDelegate",
".",
"registerConsumerDelegate",
"(",
"null",
")",
";",
"super",
".",
"tearDown",
"(",
")",
";",
"}",
"public",
"void",
"testInvalidHandle",
"(",
")",
"{",
"try",
"{",
"consumer",
".",
"invoke",
"(",
"createRenderInvocation",
"(",
"\"\"",
")",
")",
";",
"ExtendedAssert",
".",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"PortletInvokerException",
"expected",
")",
"{",
"}",
"}",
"public",
"void",
"testEmptyRender",
"(",
")",
"throws",
"Exception",
"{",
"checkRenderResult",
"(",
"consumer",
".",
"invoke",
"(",
"createRenderInvocation",
"(",
"EmptyMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
")",
",",
"\"\"",
")",
";",
"}",
"public",
"void",
"testNullAction",
"(",
")",
"throws",
"Exception",
"{",
"ExtendedAssert",
".",
"assertTrue",
"(",
"consumer",
".",
"invoke",
"(",
"createActionInvocation",
"(",
"NullMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
")",
"instanceof",
"ErrorResponse",
")",
";",
"}",
"public",
"void",
"testNullRender",
"(",
")",
"throws",
"Exception",
"{",
"ExtendedAssert",
".",
"assertTrue",
"(",
"consumer",
".",
"invoke",
"(",
"createRenderInvocation",
"(",
"NullMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
")",
"instanceof",
"ErrorResponse",
")",
";",
"}",
"public",
"void",
"testRender",
"(",
")",
"throws",
"Exception",
"{",
"RenderInvocation",
"render",
"=",
"createRenderInvocation",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"Mode",
".",
"EDIT",
",",
"WindowState",
".",
"NORMAL",
",",
"\"someNS\"",
")",
";",
"FragmentResponse",
"result",
"=",
"checkRenderResult",
"(",
"consumer",
".",
"invoke",
"(",
"render",
")",
",",
"\"\"",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"15",
",",
"result",
".",
"getCacheControl",
"(",
")",
".",
"getExpirationSecs",
"(",
")",
")",
";",
"render",
"=",
"createRenderInvocation",
"(",
"SessionMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"result",
"=",
"checkRenderResult",
"(",
"consumer",
".",
"invoke",
"(",
"render",
")",
",",
"\"\"",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"0",
",",
"result",
".",
"getCacheControl",
"(",
")",
".",
"getExpirationSecs",
"(",
")",
")",
";",
"}",
"public",
"void",
"testRenderWithSimpleExtensions",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"InvocationHandlerDelegate",
".",
"registerConsumerDelegate",
"(",
"new",
"InvocationHandlerDelegate",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"processInvocation",
"(",
"PortletInvocation",
"invocation",
")",
"{",
"ExtensionAccess",
".",
"getConsumerExtensionAccessor",
"(",
")",
".",
"addRequestExtension",
"(",
"MarkupParams",
".",
"class",
",",
"ExtensionMarkupBehavior",
".",
"EXPECTED_REQUEST_EXTENSION_VALUE",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"processInvocationResponse",
"(",
"PortletInvocationResponse",
"response",
",",
"PortletInvocation",
"invocation",
")",
"{",
"final",
"List",
"<",
"UnmarshalledExtension",
">",
"extensions",
"=",
"ExtensionAccess",
".",
"getConsumerExtensionAccessor",
"(",
")",
".",
"getResponseExtensionsFrom",
"(",
"MarkupResponse",
".",
"class",
")",
";",
"assertEquals",
"(",
"1",
",",
"extensions",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"ExtensionMarkupBehavior",
".",
"EXPECTED_RESPONSE_EXTENSION_VALUE",
",",
"extensions",
".",
"get",
"(",
"0",
")",
".",
"getValue",
"(",
")",
")",
";",
"}",
"}",
")",
";",
"checkRenderResult",
"(",
"consumer",
".",
"invoke",
"(",
"createRenderInvocation",
"(",
"ExtensionMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
")",
",",
"ExtensionMarkupBehavior",
".",
"SIMPLE_SUCCESS",
")",
";",
"}",
"public",
"void",
"testRenderWithElementExtensions",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"InvocationHandlerDelegate",
".",
"registerConsumerDelegate",
"(",
"new",
"InvocationHandlerDelegate",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"processInvocation",
"(",
"PortletInvocation",
"invocation",
")",
"{",
"final",
"String",
"namespaceURI",
"=",
"\"\"",
";",
"Element",
"extension",
"=",
"PayloadUtils",
".",
"createElement",
"(",
"namespaceURI",
",",
"\"\"",
")",
";",
"Node",
"state",
"=",
"extension",
".",
"getOwnerDocument",
"(",
")",
".",
"createElementNS",
"(",
"namespaceURI",
",",
"\"state\"",
")",
";",
"state",
"=",
"extension",
".",
"appendChild",
"(",
"state",
")",
";",
"state",
".",
"setTextContent",
"(",
"ExtensionMarkupBehavior",
".",
"EXPECTED_REQUEST_EXTENSION_VALUE",
")",
";",
"ExtensionAccess",
".",
"getConsumerExtensionAccessor",
"(",
")",
".",
"addRequestExtension",
"(",
"MarkupParams",
".",
"class",
",",
"extension",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"processInvocationResponse",
"(",
"PortletInvocationResponse",
"response",
",",
"PortletInvocation",
"invocation",
")",
"{",
"final",
"List",
"<",
"UnmarshalledExtension",
">",
"extensions",
"=",
"ExtensionAccess",
".",
"getConsumerExtensionAccessor",
"(",
")",
".",
"getResponseExtensionsFrom",
"(",
"MarkupResponse",
".",
"class",
")",
";",
"assertEquals",
"(",
"1",
",",
"extensions",
".",
"size",
"(",
")",
")",
";",
"final",
"UnmarshalledExtension",
"unmarshalledExtension",
"=",
"extensions",
".",
"get",
"(",
"0",
")",
";",
"assertTrue",
"(",
"unmarshalledExtension",
".",
"isElement",
"(",
")",
")",
";",
"Element",
"element",
"=",
"(",
"Element",
")",
"unmarshalledExtension",
".",
"getValue",
"(",
")",
";",
"assertEquals",
"(",
"ExtensionMarkupBehavior",
".",
"EXPECTED_RESPONSE_EXTENSION_VALUE",
",",
"element",
".",
"getTextContent",
"(",
")",
")",
";",
"}",
"}",
")",
";",
"checkRenderResult",
"(",
"consumer",
".",
"invoke",
"(",
"createRenderInvocation",
"(",
"ExtensionMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
")",
",",
"ExtensionMarkupBehavior",
".",
"ELEMENT_SUCCESS",
")",
";",
"}",
"public",
"void",
"testAction",
"(",
")",
"throws",
"Exception",
"{",
"ActionInvocation",
"action",
"=",
"createActionInvocation",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"PortletInvocationResponse",
"response",
"=",
"consumer",
".",
"invoke",
"(",
"action",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"response",
")",
";",
"ExtendedAssert",
".",
"assertTrue",
"(",
"\"\"",
"+",
"response",
",",
"response",
"instanceof",
"UpdateNavigationalStateResponse",
")",
";",
"UpdateNavigationalStateResponse",
"render",
"=",
"(",
"UpdateNavigationalStateResponse",
")",
"response",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"BasicMarkupBehavior",
".",
"NS",
",",
"render",
".",
"getNavigationalState",
"(",
")",
".",
"getStringValue",
"(",
")",
")",
";",
"}",
"public",
"void",
"testActionWithSimpleExtensions",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"InvocationHandlerDelegate",
".",
"registerConsumerDelegate",
"(",
"new",
"InvocationHandlerDelegate",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"processInvocation",
"(",
"PortletInvocation",
"invocation",
")",
"{",
"ExtensionAccess",
".",
"getConsumerExtensionAccessor",
"(",
")",
".",
"addRequestExtension",
"(",
"InteractionParams",
".",
"class",
",",
"ExtensionMarkupBehavior",
".",
"EXPECTED_REQUEST_EXTENSION_VALUE",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"processInvocationResponse",
"(",
"PortletInvocationResponse",
"response",
",",
"PortletInvocation",
"invocation",
")",
"{",
"final",
"List",
"<",
"UnmarshalledExtension",
">",
"extensions",
"=",
"ExtensionAccess",
".",
"getConsumerExtensionAccessor",
"(",
")",
".",
"getResponseExtensionsFrom",
"(",
"BlockingInteractionResponse",
".",
"class",
")",
";",
"assertEquals",
"(",
"1",
",",
"extensions",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"ExtensionMarkupBehavior",
".",
"EXPECTED_RESPONSE_EXTENSION_VALUE",
",",
"extensions",
".",
"get",
"(",
"0",
")",
".",
"getValue",
"(",
")",
")",
";",
"}",
"}",
")",
";",
"consumer",
".",
"invoke",
"(",
"createActionInvocation",
"(",
"ExtensionMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
")",
";",
"}",
"public",
"void",
"testSessionHandling",
"(",
")",
"throws",
"Exception",
"{",
"RenderInvocation",
"render",
"=",
"createRenderInvocation",
"(",
"SessionMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"PortletInvocationResponse",
"response",
"=",
"consumer",
".",
"invoke",
"(",
"render",
")",
";",
"checkRenderResult",
"(",
"response",
",",
"\"\"",
")",
";",
"ProducerSessionInformation",
"sessionInfo",
"=",
"consumer",
".",
"getProducerSessionInformationFrom",
"(",
"render",
")",
";",
"String",
"sessionId",
"=",
"sessionInfo",
".",
"getSessionIdForPortlet",
"(",
"SessionMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"sessionId",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"SessionMarkupBehavior",
".",
"SESSION_ID",
",",
"sessionId",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"sessionInfo",
".",
"isPerGroupCookies",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"sessionInfo",
".",
"isInitCookieDone",
"(",
")",
")",
";",
"response",
"=",
"consumer",
".",
"invoke",
"(",
"render",
")",
";",
"checkRenderResult",
"(",
"response",
",",
"\"\"",
")",
";",
"}",
"public",
"void",
"testInitCookieNotCalledWhenNotNeeded",
"(",
")",
"throws",
"Exception",
"{",
"String",
"handle",
"=",
"InitCookieNotRequiredMarkupBehavior",
".",
"INIT_COOKIE_NOT_REQUIRED_HANDLE",
";",
"InitCookieMarkupBehavior",
"behavior",
"=",
"(",
"InitCookieMarkupBehavior",
")",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
".",
"getMarkupBehaviorFor",
"(",
"handle",
")",
";",
"consumer",
".",
"getProducerInfo",
"(",
")",
".",
"setExpirationCacheSeconds",
"(",
"0",
")",
";",
"ExtendedAssert",
".",
"assertTrue",
"(",
"consumer",
".",
"getProducerInfo",
"(",
")",
".",
"isRefreshNeeded",
"(",
"true",
")",
")",
";",
"ProducerSessionInformation",
"sessionInfo",
"=",
"commonInitCookieTest",
"(",
"handle",
",",
"behavior",
",",
"CookieProtocol",
".",
"NONE",
".",
"value",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"sessionInfo",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"sessionInfo",
".",
"isPerGroupCookies",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"sessionInfo",
".",
"isInitCookieDone",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"0",
",",
"behavior",
".",
"getInitCookieCallCount",
"(",
")",
")",
";",
"}",
"public",
"void",
"testInitCookiePerUser",
"(",
")",
"throws",
"PortletInvokerException",
",",
"InvalidHandle",
"{",
"String",
"handle",
"=",
"PerUserInitCookieMarkupBehavior",
".",
"PER_USER_INIT_COOKIE_HANDLE",
";",
"InitCookieMarkupBehavior",
"behavior",
"=",
"(",
"InitCookieMarkupBehavior",
")",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
".",
"getMarkupBehaviorFor",
"(",
"handle",
")",
";",
"ProducerSessionInformation",
"sessionInfo",
"=",
"commonInitCookieTest",
"(",
"handle",
",",
"behavior",
",",
"CookieProtocol",
".",
"PER_USER",
".",
"value",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"sessionInfo",
".",
"isPerGroupCookies",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertTrue",
"(",
"sessionInfo",
".",
"isInitCookieDone",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"sessionInfo",
".",
"getUserCookie",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"1",
",",
"behavior",
".",
"getInitCookieCallCount",
"(",
")",
")",
";",
"}",
"public",
"void",
"testInitCookiePerGroup",
"(",
")",
"throws",
"PortletInvokerException",
",",
"OperationFailed",
",",
"ResourceSuspended",
",",
"ModifyRegistrationRequired",
",",
"InvalidRegistration",
",",
"InvalidHandle",
"{",
"BehaviorRegistry",
"registry",
"=",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
";",
"Holder",
"<",
"List",
"<",
"PortletDescription",
">",
">",
"offeredPortlets",
"=",
"new",
"Holder",
"<",
"List",
"<",
"PortletDescription",
">",
">",
"(",
")",
";",
"registry",
".",
"getServiceDescriptionBehavior",
"(",
")",
".",
"getServiceDescription",
"(",
"null",
",",
"null",
",",
"null",
",",
"null",
",",
"new",
"Holder",
"<",
"Boolean",
">",
"(",
")",
",",
"offeredPortlets",
",",
"new",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"(",
")",
",",
"null",
",",
"new",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"ItemDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"CookieProtocol",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"ModelDescription",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"ResourceList",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"EventDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"ModelTypes",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"ExportDescription",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"Boolean",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"Extension",
">",
">",
"(",
")",
")",
";",
"setServiceDescriptionBehavior",
"(",
"new",
"GroupedPortletsServiceDescriptionBehavior",
"(",
"offeredPortlets",
".",
"value",
")",
")",
";",
"String",
"handle",
"=",
"PerGroupInitCookieMarkupBehavior",
".",
"PER_GROUP_INIT_COOKIE_HANDLE",
";",
"InitCookieMarkupBehavior",
"behavior",
"=",
"(",
"InitCookieMarkupBehavior",
")",
"registry",
".",
"getMarkupBehaviorFor",
"(",
"handle",
")",
";",
"ProducerSessionInformation",
"sessionInfo",
"=",
"commonInitCookieTest",
"(",
"handle",
",",
"behavior",
",",
"CookieProtocol",
".",
"PER_GROUP",
".",
"value",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertTrue",
"(",
"sessionInfo",
".",
"isPerGroupCookies",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertTrue",
"(",
"sessionInfo",
".",
"isInitCookieDone",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertNull",
"(",
"sessionInfo",
".",
"getUserCookie",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"3",
",",
"behavior",
".",
"getInitCookieCallCount",
"(",
")",
")",
";",
"}",
"public",
"void",
"testResource",
"(",
")",
"throws",
"PortletInvokerException",
",",
"MalformedURLException",
"{",
"RenderInvocation",
"render",
"=",
"createRenderInvocation",
"(",
"ResourceMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"PortletInvocationResponse",
"response",
"=",
"consumer",
".",
"invoke",
"(",
"render",
")",
";",
"String",
"resourceID",
"=",
"WSRPResourceURL",
".",
"encodeResource",
"(",
"null",
",",
"new",
"URL",
"(",
"\"\"",
")",
",",
"false",
")",
";",
"String",
"expectedResult",
"=",
"\"\"",
"+",
"resourceID",
"+",
"\"'/>\"",
";",
";",
"checkRenderResult",
"(",
"response",
",",
"expectedResult",
")",
";",
"}",
"private",
"ProducerSessionInformation",
"commonInitCookieTest",
"(",
"String",
"handle",
",",
"InitCookieMarkupBehavior",
"behavior",
",",
"String",
"cookieProtocol",
")",
"throws",
"PortletInvokerException",
"{",
"RenderInvocation",
"render",
"=",
"createRenderInvocation",
"(",
"handle",
")",
";",
"TestPortletInvocationContext",
"invocationContext",
"=",
"(",
"TestPortletInvocationContext",
")",
"render",
".",
"getContext",
"(",
")",
";",
"HttpSession",
"session",
"=",
"invocationContext",
".",
"getClientRequest",
"(",
")",
".",
"getSession",
"(",
")",
";",
"producer",
".",
"setRequiresInitCookie",
"(",
"CookieProtocol",
".",
"fromValue",
"(",
"cookieProtocol",
")",
")",
";",
"consumer",
".",
"refreshProducerInfo",
"(",
")",
";",
"producer",
".",
"setCurrentMarkupBehaviorHandle",
"(",
"handle",
")",
";",
"render",
"=",
"createRenderInvocation",
"(",
"handle",
",",
"invocationContext",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"0",
",",
"behavior",
".",
"getInitCookieCallCount",
"(",
")",
")",
";",
"consumer",
".",
"invoke",
"(",
"render",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"cookieProtocol",
",",
"consumer",
".",
"getProducerInfo",
"(",
")",
".",
"getRequiresInitCookie",
"(",
")",
".",
"value",
"(",
")",
")",
";",
"return",
"consumer",
".",
"getProducerSessionInformationFrom",
"(",
"session",
")",
";",
"}",
"private",
"FragmentResponse",
"checkRenderResult",
"(",
"PortletInvocationResponse",
"response",
",",
"String",
"markup",
")",
"{",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"response",
")",
";",
"if",
"(",
"response",
"instanceof",
"ErrorResponse",
")",
"{",
"ErrorResponse",
"errorResponse",
"=",
"(",
"ErrorResponse",
")",
"response",
";",
"ExtendedAssert",
".",
"fail",
"(",
"\"\"",
"+",
"errorResponse",
".",
"getMessage",
"(",
")",
")",
";",
"}",
"ExtendedAssert",
".",
"assertTrue",
"(",
"\"\"",
"+",
"response",
",",
"response",
"instanceof",
"FragmentResponse",
")",
";",
"FragmentResponse",
"fragment",
"=",
"(",
"FragmentResponse",
")",
"response",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"markup",
",",
"fragment",
".",
"getChars",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
"fragment",
";",
"}",
"private",
"RenderInvocation",
"createRenderInvocation",
"(",
"String",
"portletHandle",
")",
"{",
"return",
"createRenderInvocation",
"(",
"portletHandle",
",",
"null",
")",
";",
"}",
"private",
"RenderInvocation",
"createRenderInvocation",
"(",
"String",
"portletHandle",
",",
"TestPortletInvocationContext",
"invocationContext",
")",
"{",
"return",
"createRenderInvocation",
"(",
"portletHandle",
",",
"Mode",
".",
"VIEW",
",",
"WindowState",
".",
"MAXIMIZED",
",",
"null",
",",
"invocationContext",
")",
";",
"}",
"private",
"RenderInvocation",
"createRenderInvocation",
"(",
"String",
"portletHandle",
",",
"Mode",
"mode",
",",
"WindowState",
"state",
",",
"String",
"navigationalState",
")",
"{",
"return",
"createRenderInvocation",
"(",
"portletHandle",
",",
"mode",
",",
"state",
",",
"navigationalState",
",",
"null",
")",
";",
"}",
"private",
"RenderInvocation",
"createRenderInvocation",
"(",
"String",
"portletHandle",
",",
"Mode",
"mode",
",",
"WindowState",
"state",
",",
"String",
"navigationalState",
",",
"TestPortletInvocationContext",
"invocationContext",
")",
"{",
"if",
"(",
"invocationContext",
"==",
"null",
")",
"{",
"invocationContext",
"=",
"new",
"TestPortletInvocationContext",
"(",
")",
";",
"}",
"RenderInvocation",
"render",
"=",
"new",
"RenderInvocation",
"(",
"invocationContext",
")",
";",
"render",
".",
"setTarget",
"(",
"PortletContext",
".",
"createPortletContext",
"(",
"portletHandle",
",",
"false",
")",
")",
";",
"render",
".",
"setMode",
"(",
"mode",
")",
";",
"render",
".",
"setWindowState",
"(",
"state",
")",
";",
"if",
"(",
"navigationalState",
"!=",
"null",
")",
"{",
"render",
".",
"setNavigationalState",
"(",
"new",
"OpaqueStateString",
"(",
"navigationalState",
")",
")",
";",
"}",
"render",
".",
"setInstanceContext",
"(",
"new",
"AbstractInstanceContext",
"(",
"portletHandle",
")",
")",
";",
"render",
".",
"setSecurityContext",
"(",
"new",
"AbstractSecurityContext",
"(",
"MockHttpServletRequest",
".",
"createMockRequest",
"(",
"null",
")",
")",
")",
";",
"render",
".",
"setUserContext",
"(",
"new",
"MockUserContext",
"(",
")",
")",
";",
"render",
".",
"setWindowContext",
"(",
"new",
"AbstractWindowContext",
"(",
"\"\"",
")",
")",
";",
"render",
".",
"setPortalContext",
"(",
"new",
"AbstractPortalContext",
"(",
")",
")",
";",
"RequestedMarkupBehavior",
".",
"setRequestedMarkupBehavior",
"(",
"portletHandle",
")",
";",
"return",
"render",
";",
"}",
"private",
"ActionInvocation",
"createActionInvocation",
"(",
"String",
"portletHandle",
")",
"{",
"TestPortletInvocationContext",
"ac",
"=",
"new",
"TestPortletInvocationContext",
"(",
")",
";",
"ActionInvocation",
"action",
"=",
"new",
"ActionInvocation",
"(",
"ac",
")",
";",
"action",
".",
"setInstanceContext",
"(",
"new",
"AbstractInstanceContext",
"(",
"portletHandle",
")",
")",
";",
"action",
".",
"setSecurityContext",
"(",
"new",
"AbstractSecurityContext",
"(",
"MockHttpServletRequest",
".",
"createMockRequest",
"(",
"null",
")",
")",
")",
";",
"action",
".",
"setUserContext",
"(",
"new",
"MockUserContext",
"(",
")",
")",
";",
"action",
".",
"setTarget",
"(",
"PortletContext",
".",
"createPortletContext",
"(",
"portletHandle",
",",
"false",
")",
")",
";",
"RequestedMarkupBehavior",
".",
"setRequestedMarkupBehavior",
"(",
"portletHandle",
")",
";",
"return",
"action",
";",
"}",
"static",
"class",
"MockUserContext",
"extends",
"AbstractUserContext",
"{",
"@",
"Override",
"public",
"List",
"<",
"Locale",
">",
"getLocales",
"(",
")",
"{",
"return",
"Collections",
".",
"singletonList",
"(",
"Locale",
".",
"ENGLISH",
")",
";",
"}",
"}",
"}",
"</s>"
] |
12,377 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Mode",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"OpaqueStateString",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletInvokerException",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"WindowState",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"ActionInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"RenderInvocation",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"response",
".",
"ErrorResponse",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"response",
".",
"FragmentResponse",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"response",
".",
"PortletInvocationResponse",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"invocation",
".",
"response",
".",
"UpdateNavigationalStateResponse",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractInstanceContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractPortalContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractSecurityContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractUserContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"portlet",
".",
"impl",
".",
"spi",
".",
"AbstractWindowContext",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"WSRPResourceURL",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"handlers",
".",
"ProducerSessionInformation",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"BasicMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"EmptyMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"GroupedPortletsServiceDescriptionBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"InitCookieMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"InitCookieNotRequiredMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"NullMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"PerGroupInitCookieMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"PerUserInitCookieMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"ResourceMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"SessionMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"MockHttpServletRequest",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"RequestedMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"TestPortletInvocationContext",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1CookieProtocol",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1Extension",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidHandle",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1InvalidRegistration",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ItemDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ModelDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1OperationFailed",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1PortletDescription",
";",
"import",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v1",
".",
"V1ResourceList",
";",
"import",
"javax",
".",
"servlet",
".",
"http",
".",
"HttpSession",
";",
"import",
"javax",
".",
"xml",
".",
"ws",
".",
"Holder",
";",
"import",
"java",
".",
"net",
".",
"MalformedURLException",
";",
"import",
"java",
".",
"net",
".",
"URL",
";",
"import",
"java",
".",
"util",
".",
"Collections",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Locale",
";",
"public",
"class",
"MarkupTestCase",
"extends",
"V1ConsumerBaseTest",
"{",
"public",
"MarkupTestCase",
"(",
")",
"throws",
"Exception",
"{",
"super",
"(",
")",
";",
"}",
"public",
"void",
"testInvalidHandle",
"(",
")",
"{",
"try",
"{",
"consumer",
".",
"invoke",
"(",
"createRenderInvocation",
"(",
"\"\"",
")",
")",
";",
"ExtendedAssert",
".",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"PortletInvokerException",
"expected",
")",
"{",
"}",
"}",
"public",
"void",
"testEmptyRender",
"(",
")",
"throws",
"Exception",
"{",
"checkRenderResult",
"(",
"consumer",
".",
"invoke",
"(",
"createRenderInvocation",
"(",
"EmptyMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
")",
",",
"\"\"",
")",
";",
"}",
"public",
"void",
"testNullAction",
"(",
")",
"throws",
"Exception",
"{",
"ExtendedAssert",
".",
"assertTrue",
"(",
"consumer",
".",
"invoke",
"(",
"createActionInvocation",
"(",
"NullMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
")",
"instanceof",
"ErrorResponse",
")",
";",
"}",
"public",
"void",
"testNullRender",
"(",
")",
"throws",
"Exception",
"{",
"ExtendedAssert",
".",
"assertTrue",
"(",
"consumer",
".",
"invoke",
"(",
"createRenderInvocation",
"(",
"NullMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
")",
"instanceof",
"ErrorResponse",
")",
";",
"}",
"public",
"void",
"testRender",
"(",
")",
"throws",
"Exception",
"{",
"RenderInvocation",
"render",
"=",
"createRenderInvocation",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"Mode",
".",
"EDIT",
",",
"WindowState",
".",
"NORMAL",
",",
"\"someNS\"",
")",
";",
"FragmentResponse",
"result",
"=",
"checkRenderResult",
"(",
"consumer",
".",
"invoke",
"(",
"render",
")",
",",
"\"\"",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"15",
",",
"result",
".",
"getCacheControl",
"(",
")",
".",
"getExpirationSecs",
"(",
")",
")",
";",
"render",
"=",
"createRenderInvocation",
"(",
"SessionMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"result",
"=",
"checkRenderResult",
"(",
"consumer",
".",
"invoke",
"(",
"render",
")",
",",
"\"\"",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"0",
",",
"result",
".",
"getCacheControl",
"(",
")",
".",
"getExpirationSecs",
"(",
")",
")",
";",
"}",
"public",
"void",
"testAction",
"(",
")",
"throws",
"Exception",
"{",
"ActionInvocation",
"action",
"=",
"createActionInvocation",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"PortletInvocationResponse",
"response",
"=",
"consumer",
".",
"invoke",
"(",
"action",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"response",
")",
";",
"ExtendedAssert",
".",
"assertTrue",
"(",
"\"\"",
"+",
"response",
",",
"response",
"instanceof",
"UpdateNavigationalStateResponse",
")",
";",
"UpdateNavigationalStateResponse",
"render",
"=",
"(",
"UpdateNavigationalStateResponse",
")",
"response",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"BasicMarkupBehavior",
".",
"NS",
",",
"render",
".",
"getNavigationalState",
"(",
")",
".",
"getStringValue",
"(",
")",
")",
";",
"}",
"public",
"void",
"testSessionHandling",
"(",
")",
"throws",
"Exception",
"{",
"RenderInvocation",
"render",
"=",
"createRenderInvocation",
"(",
"SessionMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"PortletInvocationResponse",
"response",
"=",
"consumer",
".",
"invoke",
"(",
"render",
")",
";",
"checkRenderResult",
"(",
"response",
",",
"\"\"",
")",
";",
"ProducerSessionInformation",
"sessionInfo",
"=",
"consumer",
".",
"getProducerSessionInformationFrom",
"(",
"render",
")",
";",
"String",
"sessionId",
"=",
"sessionInfo",
".",
"getSessionIdForPortlet",
"(",
"SessionMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"sessionId",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"SessionMarkupBehavior",
".",
"SESSION_ID",
",",
"sessionId",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"sessionInfo",
".",
"isPerGroupCookies",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"sessionInfo",
".",
"isInitCookieDone",
"(",
")",
")",
";",
"response",
"=",
"consumer",
".",
"invoke",
"(",
"render",
")",
";",
"checkRenderResult",
"(",
"response",
",",
"\"\"",
")",
";",
"}",
"public",
"void",
"testInitCookieNotCalledWhenNotNeeded",
"(",
")",
"throws",
"Exception",
"{",
"String",
"handle",
"=",
"InitCookieNotRequiredMarkupBehavior",
".",
"INIT_COOKIE_NOT_REQUIRED_HANDLE",
";",
"InitCookieMarkupBehavior",
"behavior",
"=",
"(",
"InitCookieMarkupBehavior",
")",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
".",
"getMarkupBehaviorFor",
"(",
"handle",
")",
";",
"consumer",
".",
"getProducerInfo",
"(",
")",
".",
"setExpirationCacheSeconds",
"(",
"0",
")",
";",
"ExtendedAssert",
".",
"assertTrue",
"(",
"consumer",
".",
"getProducerInfo",
"(",
")",
".",
"isRefreshNeeded",
"(",
"true",
")",
")",
";",
"ProducerSessionInformation",
"sessionInfo",
"=",
"commonInitCookieTest",
"(",
"handle",
",",
"behavior",
",",
"V1CookieProtocol",
".",
"NONE",
".",
"value",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"sessionInfo",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"sessionInfo",
".",
"isPerGroupCookies",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"sessionInfo",
".",
"isInitCookieDone",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"0",
",",
"behavior",
".",
"getInitCookieCallCount",
"(",
")",
")",
";",
"}",
"public",
"void",
"testInitCookiePerUser",
"(",
")",
"throws",
"PortletInvokerException",
",",
"V1InvalidHandle",
"{",
"String",
"handle",
"=",
"PerUserInitCookieMarkupBehavior",
".",
"PER_USER_INIT_COOKIE_HANDLE",
";",
"InitCookieMarkupBehavior",
"behavior",
"=",
"(",
"InitCookieMarkupBehavior",
")",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
".",
"getMarkupBehaviorFor",
"(",
"handle",
")",
";",
"ProducerSessionInformation",
"sessionInfo",
"=",
"commonInitCookieTest",
"(",
"handle",
",",
"behavior",
",",
"V1CookieProtocol",
".",
"PER_USER",
".",
"value",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"sessionInfo",
".",
"isPerGroupCookies",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertTrue",
"(",
"sessionInfo",
".",
"isInitCookieDone",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"sessionInfo",
".",
"getUserCookie",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"1",
",",
"behavior",
".",
"getInitCookieCallCount",
"(",
")",
")",
";",
"}",
"public",
"void",
"testInitCookiePerGroup",
"(",
")",
"throws",
"PortletInvokerException",
",",
"V1InvalidHandle",
",",
"V1InvalidRegistration",
",",
"V1OperationFailed",
"{",
"BehaviorRegistry",
"registry",
"=",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
";",
"Holder",
"<",
"List",
"<",
"V1PortletDescription",
">",
">",
"offeredPortlets",
"=",
"new",
"Holder",
"<",
"List",
"<",
"V1PortletDescription",
">",
">",
"(",
")",
";",
"registry",
".",
"getServiceDescriptionBehavior",
"(",
")",
".",
"getServiceDescription",
"(",
"null",
",",
"null",
",",
"new",
"Holder",
"<",
"Boolean",
">",
"(",
")",
",",
"offeredPortlets",
",",
"new",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"V1ItemDescription",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"V1CookieProtocol",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"V1ModelDescription",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"String",
">",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"V1ResourceList",
">",
"(",
")",
",",
"new",
"Holder",
"<",
"List",
"<",
"V1Extension",
">",
">",
"(",
")",
")",
";",
"setServiceDescriptionBehavior",
"(",
"new",
"GroupedPortletsServiceDescriptionBehavior",
"(",
"offeredPortlets",
".",
"value",
")",
")",
";",
"String",
"handle",
"=",
"PerGroupInitCookieMarkupBehavior",
".",
"PER_GROUP_INIT_COOKIE_HANDLE",
";",
"InitCookieMarkupBehavior",
"behavior",
"=",
"(",
"InitCookieMarkupBehavior",
")",
"registry",
".",
"getMarkupBehaviorFor",
"(",
"handle",
")",
";",
"ProducerSessionInformation",
"sessionInfo",
"=",
"commonInitCookieTest",
"(",
"handle",
",",
"behavior",
",",
"V1CookieProtocol",
".",
"PER_GROUP",
".",
"value",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertTrue",
"(",
"sessionInfo",
".",
"isPerGroupCookies",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertTrue",
"(",
"sessionInfo",
".",
"isInitCookieDone",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertNull",
"(",
"sessionInfo",
".",
"getUserCookie",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"3",
",",
"behavior",
".",
"getInitCookieCallCount",
"(",
")",
")",
";",
"}",
"public",
"void",
"testResource",
"(",
")",
"throws",
"PortletInvokerException",
",",
"MalformedURLException",
"{",
"RenderInvocation",
"render",
"=",
"createRenderInvocation",
"(",
"ResourceMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"PortletInvocationResponse",
"response",
"=",
"consumer",
".",
"invoke",
"(",
"render",
")",
";",
"String",
"resourceID",
"=",
"WSRPResourceURL",
".",
"encodeResource",
"(",
"null",
",",
"new",
"URL",
"(",
"\"\"",
")",
",",
"false",
")",
";",
"String",
"expectedResult",
"=",
"\"\"",
"+",
"resourceID",
"+",
"\"'/>\"",
";",
"checkRenderResult",
"(",
"response",
",",
"expectedResult",
")",
";",
"}",
"private",
"ProducerSessionInformation",
"commonInitCookieTest",
"(",
"String",
"handle",
",",
"InitCookieMarkupBehavior",
"behavior",
",",
"String",
"cookieProtocol",
")",
"throws",
"PortletInvokerException",
"{",
"RenderInvocation",
"render",
"=",
"createRenderInvocation",
"(",
"handle",
")",
";",
"TestPortletInvocationContext",
"invocationContext",
"=",
"(",
"TestPortletInvocationContext",
")",
"render",
".",
"getContext",
"(",
")",
";",
"HttpSession",
"session",
"=",
"invocationContext",
".",
"getClientRequest",
"(",
")",
".",
"getSession",
"(",
")",
";",
"producer",
".",
"setRequiresInitCookie",
"(",
"cookieProtocol",
")",
";",
"consumer",
".",
"refreshProducerInfo",
"(",
")",
";",
"producer",
".",
"setCurrentMarkupBehaviorHandle",
"(",
"handle",
")",
";",
"render",
"=",
"createRenderInvocation",
"(",
"handle",
",",
"invocationContext",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"0",
",",
"behavior",
".",
"getInitCookieCallCount",
"(",
")",
")",
";",
"consumer",
".",
"invoke",
"(",
"render",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"cookieProtocol",
",",
"consumer",
".",
"getProducerInfo",
"(",
")",
".",
"getRequiresInitCookie",
"(",
")",
".",
"value",
"(",
")",
")",
";",
"return",
"consumer",
".",
"getProducerSessionInformationFrom",
"(",
"session",
")",
";",
"}",
"private",
"FragmentResponse",
"checkRenderResult",
"(",
"PortletInvocationResponse",
"response",
",",
"String",
"markup",
")",
"{",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"response",
")",
";",
"if",
"(",
"response",
"instanceof",
"ErrorResponse",
")",
"{",
"ErrorResponse",
"errorResponse",
"=",
"(",
"ErrorResponse",
")",
"response",
";",
"ExtendedAssert",
".",
"fail",
"(",
"\"\"",
"+",
"errorResponse",
".",
"getMessage",
"(",
")",
")",
";",
"}",
"ExtendedAssert",
".",
"assertTrue",
"(",
"\"\"",
"+",
"response",
",",
"response",
"instanceof",
"FragmentResponse",
")",
";",
"FragmentResponse",
"fragment",
"=",
"(",
"FragmentResponse",
")",
"response",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"markup",
",",
"fragment",
".",
"getChars",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
"fragment",
";",
"}",
"private",
"RenderInvocation",
"createRenderInvocation",
"(",
"String",
"portletHandle",
")",
"{",
"return",
"createRenderInvocation",
"(",
"portletHandle",
",",
"null",
")",
";",
"}",
"private",
"RenderInvocation",
"createRenderInvocation",
"(",
"String",
"portletHandle",
",",
"TestPortletInvocationContext",
"invocationContext",
")",
"{",
"return",
"createRenderInvocation",
"(",
"portletHandle",
",",
"Mode",
".",
"VIEW",
",",
"WindowState",
".",
"MAXIMIZED",
",",
"null",
",",
"invocationContext",
")",
";",
"}",
"private",
"RenderInvocation",
"createRenderInvocation",
"(",
"String",
"portletHandle",
",",
"Mode",
"mode",
",",
"WindowState",
"state",
",",
"String",
"navigationalState",
")",
"{",
"return",
"createRenderInvocation",
"(",
"portletHandle",
",",
"mode",
",",
"state",
",",
"navigationalState",
",",
"null",
")",
";",
"}",
"private",
"RenderInvocation",
"createRenderInvocation",
"(",
"String",
"portletHandle",
",",
"Mode",
"mode",
",",
"WindowState",
"state",
",",
"String",
"navigationalState",
",",
"TestPortletInvocationContext",
"invocationContext",
")",
"{",
"if",
"(",
"invocationContext",
"==",
"null",
")",
"{",
"invocationContext",
"=",
"new",
"TestPortletInvocationContext",
"(",
")",
";",
"}",
"RenderInvocation",
"render",
"=",
"new",
"RenderInvocation",
"(",
"invocationContext",
")",
";",
"render",
".",
"setTarget",
"(",
"PortletContext",
".",
"createPortletContext",
"(",
"portletHandle",
",",
"false",
")",
")",
";",
"render",
".",
"setMode",
"(",
"mode",
")",
";",
"render",
".",
"setWindowState",
"(",
"state",
")",
";",
"if",
"(",
"navigationalState",
"!=",
"null",
")",
"{",
"render",
".",
"setNavigationalState",
"(",
"new",
"OpaqueStateString",
"(",
"navigationalState",
")",
")",
";",
"}",
"render",
".",
"setInstanceContext",
"(",
"new",
"AbstractInstanceContext",
"(",
"portletHandle",
")",
")",
";",
"render",
".",
"setSecurityContext",
"(",
"new",
"AbstractSecurityContext",
"(",
"MockHttpServletRequest",
".",
"createMockRequest",
"(",
"null",
")",
")",
")",
";",
"render",
".",
"setUserContext",
"(",
"new",
"MockUserContext",
"(",
")",
")",
";",
"render",
".",
"setWindowContext",
"(",
"new",
"AbstractWindowContext",
"(",
"\"\"",
")",
")",
";",
"render",
".",
"setPortalContext",
"(",
"new",
"AbstractPortalContext",
"(",
")",
")",
";",
"RequestedMarkupBehavior",
".",
"setRequestedMarkupBehavior",
"(",
"portletHandle",
")",
";",
"return",
"render",
";",
"}",
"private",
"ActionInvocation",
"createActionInvocation",
"(",
"String",
"portletHandle",
")",
"{",
"TestPortletInvocationContext",
"ac",
"=",
"new",
"TestPortletInvocationContext",
"(",
")",
";",
"ActionInvocation",
"action",
"=",
"new",
"ActionInvocation",
"(",
"ac",
")",
";",
"action",
".",
"setInstanceContext",
"(",
"new",
"AbstractInstanceContext",
"(",
"portletHandle",
")",
")",
";",
"action",
".",
"setSecurityContext",
"(",
"new",
"AbstractSecurityContext",
"(",
"MockHttpServletRequest",
".",
"createMockRequest",
"(",
"null",
")",
")",
")",
";",
"action",
".",
"setUserContext",
"(",
"new",
"MockUserContext",
"(",
")",
")",
";",
"action",
".",
"setTarget",
"(",
"PortletContext",
".",
"createPortletContext",
"(",
"portletHandle",
",",
"false",
")",
")",
";",
"RequestedMarkupBehavior",
".",
"setRequestedMarkupBehavior",
"(",
"portletHandle",
")",
";",
"return",
"action",
";",
"}",
"static",
"class",
"MockUserContext",
"extends",
"AbstractUserContext",
"{",
"@",
"Override",
"public",
"List",
"<",
"Locale",
">",
"getLocales",
"(",
")",
"{",
"return",
"Collections",
".",
"singletonList",
"(",
"Locale",
".",
"ENGLISH",
")",
";",
"}",
"}",
"}",
"</s>"
] |
12,378 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Portlet",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"info",
".",
"MetaInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"TestProducerBehavior",
";",
"public",
"class",
"V1ConsumerBaseTest",
"extends",
"WSRP1ConsumerBaseTest",
"{",
"public",
"V1ConsumerBaseTest",
"(",
")",
"throws",
"Exception",
"{",
"}",
"protected",
"void",
"checkPortlet",
"(",
"Portlet",
"portlet",
",",
"String",
"suffix",
",",
"String",
"handle",
")",
"{",
"MetaInfo",
"meta",
"=",
"portlet",
".",
"getInfo",
"(",
")",
".",
"getMeta",
"(",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"handle",
",",
"portlet",
".",
"getContext",
"(",
")",
".",
"getId",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"TestProducerBehavior",
".",
"SAMPLE_DESCRIPTION",
"+",
"suffix",
",",
"TestProducerBehavior",
".",
"extractString",
"(",
"meta",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"DESCRIPTION",
")",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"TestProducerBehavior",
".",
"SAMPLE_TITLE",
"+",
"suffix",
",",
"TestProducerBehavior",
".",
"extractString",
"(",
"meta",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"TITLE",
")",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"TestProducerBehavior",
".",
"SAMPLE_SHORTTITLE",
"+",
"suffix",
",",
"TestProducerBehavior",
".",
"extractString",
"(",
"meta",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"SHORT_TITLE",
")",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"TestProducerBehavior",
".",
"SAMPLE_DISPLAYNAME",
"+",
"suffix",
",",
"TestProducerBehavior",
".",
"extractString",
"(",
"meta",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"DISPLAY_NAME",
")",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"TestProducerBehavior",
".",
"SAMPLE_KEYWORD",
"+",
"suffix",
",",
"TestProducerBehavior",
".",
"extractString",
"(",
"meta",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"KEYWORDS",
")",
")",
")",
";",
"}",
"public",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"super",
".",
"setUp",
"(",
")",
";",
"}",
"}",
"</s>"
] |
12,379 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Portlet",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletContext",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"BasicMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"SessionMarkupBehavior",
";",
"public",
"class",
"ServiceDescriptionTestCase",
"extends",
"InteropServiceDescriptionTestCase",
"{",
"public",
"ServiceDescriptionTestCase",
"(",
")",
"throws",
"Exception",
"{",
"super",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"super",
".",
"setUp",
"(",
")",
";",
"setStrict",
"(",
"true",
")",
";",
"}",
"public",
"void",
"testUsesRelaxedMode",
"(",
")",
"{",
"ExtendedAssert",
".",
"assertTrue",
"(",
"isStrict",
"(",
")",
")",
";",
"}",
"public",
"void",
"testGetPortlet",
"(",
")",
"throws",
"Exception",
"{",
"Portlet",
"portlet",
"=",
"consumer",
".",
"getPortlet",
"(",
"PortletContext",
".",
"createPortletContext",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
")",
";",
"checkPortlet",
"(",
"portlet",
",",
"\"\"",
",",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"portlet",
"=",
"consumer",
".",
"getPortlet",
"(",
"PortletContext",
".",
"createPortletContext",
"(",
"SessionMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
")",
";",
"checkPortlet",
"(",
"portlet",
",",
"\"2\"",
",",
"SessionMarkupBehavior",
".",
"PORTLET_HANDLE",
")",
";",
"}",
"}",
"</s>"
] |
12,380 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"protocol",
".",
"v1",
";",
"import",
"junit",
".",
"framework",
".",
"TestCase",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"EndpointConfigurationInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"ProducerInfo",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"consumer",
".",
"WSRPConsumerImpl",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorBackedServiceFactory",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"PortletManagementBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"RegistrationBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"ServiceDescriptionBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"TestProducerBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"TestWSRPProducer",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"TestWSRPProducerImpl",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"BasicMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"BasicPortletManagementBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"BasicServiceDescriptionBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"EmptyMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"InitCookieNotRequiredMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"NullMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"PerGroupInitCookieMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"PerUserInitCookieMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"ResourceMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"SessionMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"MockConsumerRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"support",
".",
"RequestedMarkupBehavior",
";",
"import",
"org",
".",
"slf4j",
".",
"Logger",
";",
"import",
"org",
".",
"slf4j",
".",
"LoggerFactory",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"public",
"abstract",
"class",
"WSRP1ConsumerBaseTest",
"extends",
"TestCase",
"{",
"private",
"static",
"Logger",
"log",
"=",
"LoggerFactory",
".",
"getLogger",
"(",
"WSRP1ConsumerBaseTest",
".",
"class",
")",
";",
"private",
"static",
"final",
"String",
"TEST_PRODUCER_ID",
"=",
"\"\"",
";",
"protected",
"TestWSRPProducer",
"producer",
"=",
"new",
"TestWSRPProducerImpl",
"(",
")",
";",
"protected",
"WSRPConsumerImpl",
"consumer",
"=",
"new",
"WSRPConsumerImpl",
"(",
"new",
"ProducerInfo",
"(",
"new",
"MockConsumerRegistry",
"(",
")",
")",
")",
";",
"private",
"boolean",
"strict",
"=",
"true",
";",
"public",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"producer",
".",
"reset",
"(",
")",
";",
"ProducerInfo",
"producerInfo",
"=",
"consumer",
".",
"getProducerInfo",
"(",
")",
";",
"producerInfo",
".",
"setId",
"(",
"TEST_PRODUCER_ID",
")",
";",
"BehaviorRegistry",
"registry",
"=",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
";",
"setServiceDescriptionBehavior",
"(",
"null",
")",
";",
"setPortletManagementBehavior",
"(",
"null",
")",
";",
"setRegistrationBehavior",
"(",
"null",
")",
";",
"registerAdditionalMarkupBehaviors",
"(",
"registry",
")",
";",
"producerInfo",
".",
"setEndpointConfigurationInfo",
"(",
"new",
"EndpointConfigurationInfo",
"(",
"new",
"BehaviorBackedServiceFactory",
"(",
"registry",
")",
")",
")",
";",
"producerInfo",
".",
"setExpirationCacheSeconds",
"(",
"null",
")",
";",
"consumer",
".",
"refreshProducerInfo",
"(",
")",
";",
"producerInfo",
".",
"setExpirationCacheSeconds",
"(",
"120",
")",
";",
"}",
"protected",
"void",
"setRegistrationBehavior",
"(",
"RegistrationBehavior",
"behavior",
")",
"{",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
".",
"setRegistrationBehavior",
"(",
"behavior",
")",
";",
"}",
"protected",
"void",
"setServiceDescriptionBehavior",
"(",
"ServiceDescriptionBehavior",
"behavior",
")",
"{",
"if",
"(",
"behavior",
"==",
"null",
")",
"{",
"log",
".",
"debug",
"(",
"\"\"",
")",
";",
"behavior",
"=",
"new",
"BasicServiceDescriptionBehavior",
"(",
")",
";",
"}",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
".",
"setServiceDescriptionBehavior",
"(",
"behavior",
")",
";",
"}",
"protected",
"void",
"setPortletManagementBehavior",
"(",
"PortletManagementBehavior",
"behavior",
")",
"{",
"BehaviorRegistry",
"registry",
"=",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
";",
"if",
"(",
"behavior",
"==",
"null",
")",
"{",
"log",
".",
"debug",
"(",
"\"\"",
")",
";",
"behavior",
"=",
"new",
"BasicPortletManagementBehavior",
"(",
"registry",
")",
";",
"}",
"registry",
".",
"setPortletManagementBehavior",
"(",
"behavior",
")",
";",
"}",
"public",
"void",
"testProducerId",
"(",
")",
"{",
"ExtendedAssert",
".",
"assertEquals",
"(",
"TEST_PRODUCER_ID",
",",
"consumer",
".",
"getProducerId",
"(",
")",
")",
";",
"}",
"public",
"void",
"setStrict",
"(",
"boolean",
"strict",
")",
"{",
"this",
".",
"strict",
"=",
"strict",
";",
"producer",
".",
"usingStrictModeChangedTo",
"(",
"strict",
")",
";",
"}",
"public",
"boolean",
"isStrict",
"(",
")",
"{",
"return",
"strict",
";",
"}",
"private",
"<",
"T",
"extends",
"TestProducerBehavior",
">",
"T",
"createBehavior",
"(",
"String",
"behaviorClassName",
",",
"Class",
"<",
"T",
">",
"expectedBehaviorClass",
")",
"{",
"if",
"(",
"behaviorClassName",
"!=",
"null",
")",
"{",
"try",
"{",
"Class",
"behaviorClass",
"=",
"getClass",
"(",
")",
".",
"getClassLoader",
"(",
")",
".",
"loadClass",
"(",
"behaviorClassName",
")",
";",
"if",
"(",
"expectedBehaviorClass",
".",
"isAssignableFrom",
"(",
"behaviorClass",
")",
")",
"{",
"return",
"expectedBehaviorClass",
".",
"cast",
"(",
"behaviorClass",
".",
"newInstance",
"(",
")",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"behaviorClassName",
"+",
"\"",
"is",
"not",
"a",
"\"",
"+",
"expectedBehaviorClass",
".",
"getSimpleName",
"(",
")",
")",
";",
"}",
"}",
"catch",
"(",
"ClassNotFoundException",
"e",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"behaviorClassName",
",",
"e",
")",
";",
"}",
"catch",
"(",
"IllegalAccessException",
"e",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"behaviorClassName",
",",
"e",
")",
";",
"}",
"catch",
"(",
"InstantiationException",
"e",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"behaviorClassName",
",",
"e",
")",
";",
"}",
"}",
"return",
"null",
";",
"}",
"protected",
"void",
"registerAdditionalMarkupBehaviors",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"BasicMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"EmptyMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"InitCookieNotRequiredMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"PerGroupInitCookieMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"PerUserInitCookieMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"NullMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"SessionMarkupBehavior",
"(",
"registry",
")",
")",
";",
"registry",
".",
"registerMarkupBehavior",
"(",
"new",
"ResourceMarkupBehavior",
"(",
"registry",
")",
")",
";",
"}",
"protected",
"Set",
"<",
"String",
">",
"getPortletHandles",
"(",
")",
"{",
"return",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
".",
"getServiceDescriptionBehavior",
"(",
")",
".",
"getPortletHandles",
"(",
")",
";",
"}",
"protected",
"int",
"getPortletNumber",
"(",
")",
"{",
"return",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
".",
"getServiceDescriptionBehavior",
"(",
")",
".",
"getPortletNumber",
"(",
")",
";",
"}",
"@",
"Override",
"protected",
"void",
"tearDown",
"(",
")",
"throws",
"Exception",
"{",
"RequestedMarkupBehavior",
".",
"setRequestedMarkupBehavior",
"(",
"null",
")",
";",
"}",
"}",
"</s>"
] |
12,381 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Portlet",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletInvokerException",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"java",
".",
"util",
".",
"HashSet",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"public",
"class",
"InteropServiceDescriptionTestCase",
"extends",
"V1ConsumerBaseTest",
"{",
"public",
"InteropServiceDescriptionTestCase",
"(",
")",
"throws",
"Exception",
"{",
"super",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"setUp",
"(",
")",
"throws",
"Exception",
"{",
"setStrict",
"(",
"false",
")",
";",
"super",
".",
"setUp",
"(",
")",
";",
"}",
"public",
"void",
"testUsesRelaxedMode",
"(",
")",
"{",
"ExtendedAssert",
".",
"assertFalse",
"(",
"isStrict",
"(",
")",
")",
";",
"}",
"public",
"void",
"testGetPortlets",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"Set",
"returnedPortlets",
"=",
"consumer",
".",
"getPortlets",
"(",
")",
";",
"int",
"portletNumber",
"=",
"returnedPortlets",
".",
"size",
"(",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"getPortletNumber",
"(",
")",
",",
"portletNumber",
")",
";",
"Set",
"<",
"String",
">",
"handles",
"=",
"getPortletHandles",
"(",
")",
";",
"Set",
"<",
"String",
">",
"consumerHandles",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
"portletNumber",
")",
";",
"for",
"(",
"Object",
"o",
":",
"returnedPortlets",
")",
"{",
"Portlet",
"portlet",
"=",
"(",
"Portlet",
")",
"o",
";",
"consumerHandles",
".",
"add",
"(",
"portlet",
".",
"getContext",
"(",
")",
".",
"getId",
"(",
")",
")",
";",
"}",
"ExtendedAssert",
".",
"assertTrue",
"(",
"handles",
".",
"containsAll",
"(",
"consumerHandles",
")",
")",
";",
"}",
"@",
"Override",
"protected",
"void",
"registerAdditionalMarkupBehaviors",
"(",
"BehaviorRegistry",
"registry",
")",
"{",
"}",
"}",
"</s>"
] |
12,382 | [
"<s>",
"package",
"org",
".",
"gatein",
".",
"wsrp",
".",
"protocol",
".",
"v1",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"Portlet",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletContext",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletInvokerException",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"PortletStateType",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"info",
".",
"MetaInfo",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"state",
".",
"DestroyCloneFailure",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"state",
".",
"PropertyChange",
";",
"import",
"org",
".",
"gatein",
".",
"pc",
".",
"api",
".",
"state",
".",
"PropertyMap",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"ExtendedAssert",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"BehaviorRegistry",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"BasicMarkupBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"BasicPortletManagementBehavior",
";",
"import",
"org",
".",
"gatein",
".",
"wsrp",
".",
"test",
".",
"protocol",
".",
"v1",
".",
"behaviors",
".",
"DestroyClonesPortletManagementBehavior",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"PortletManagementTestCase",
"extends",
"V1ConsumerBaseTest",
"{",
"public",
"PortletManagementTestCase",
"(",
")",
"throws",
"Exception",
"{",
"}",
"public",
"void",
"testClone",
"(",
")",
"throws",
"Exception",
"{",
"PortletContext",
"original",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
";",
"PortletContext",
"clone",
"=",
"consumer",
".",
"createClone",
"(",
"PortletStateType",
".",
"OPAQUE",
",",
"original",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"clone",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"original",
".",
"equals",
"(",
"clone",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"BasicPortletManagementBehavior",
".",
"CLONED_HANDLE",
",",
"clone",
".",
"getId",
"(",
")",
")",
";",
"Portlet",
"originalPortlet",
"=",
"consumer",
".",
"getPortlet",
"(",
"original",
")",
";",
"Portlet",
"clonePortlet",
"=",
"consumer",
".",
"getPortlet",
"(",
"clone",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"clonePortlet",
")",
";",
"ExtendedAssert",
".",
"assertFalse",
"(",
"originalPortlet",
".",
"getContext",
"(",
")",
".",
"equals",
"(",
"clonePortlet",
".",
"getContext",
"(",
")",
")",
")",
";",
"MetaInfo",
"originalInfo",
"=",
"originalPortlet",
".",
"getInfo",
"(",
")",
".",
"getMeta",
"(",
")",
";",
"MetaInfo",
"cloneInfo",
"=",
"clonePortlet",
".",
"getInfo",
"(",
")",
".",
"getMeta",
"(",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"originalInfo",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"TITLE",
")",
",",
"cloneInfo",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"TITLE",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"originalInfo",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"DESCRIPTION",
")",
",",
"cloneInfo",
".",
"getMetaValue",
"(",
"MetaInfo",
".",
"DESCRIPTION",
")",
")",
";",
"}",
"public",
"void",
"testGetSetProperties",
"(",
")",
"throws",
"Exception",
"{",
"PortletContext",
"original",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
";",
"PropertyMap",
"props",
"=",
"consumer",
".",
"getProperties",
"(",
"original",
")",
";",
"checkProperties",
"(",
"props",
",",
"BasicPortletManagementBehavior",
".",
"PROPERTY_VALUE",
")",
";",
"PortletContext",
"clone",
"=",
"consumer",
".",
"createClone",
"(",
"PortletStateType",
".",
"OPAQUE",
",",
"original",
")",
";",
"props",
"=",
"consumer",
".",
"getProperties",
"(",
"clone",
")",
";",
"checkProperties",
"(",
"props",
",",
"BasicPortletManagementBehavior",
".",
"PROPERTY_VALUE",
")",
";",
"consumer",
".",
"setProperties",
"(",
"clone",
",",
"new",
"PropertyChange",
"[",
"]",
"{",
"PropertyChange",
".",
"newUpdate",
"(",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NAME",
",",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NEW_VALUE",
")",
"}",
")",
";",
"checkProperties",
"(",
"consumer",
".",
"getProperties",
"(",
"clone",
")",
",",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NEW_VALUE",
")",
";",
"consumer",
".",
"setProperties",
"(",
"clone",
",",
"new",
"PropertyChange",
"[",
"]",
"{",
"PropertyChange",
".",
"newReset",
"(",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NAME",
")",
"}",
")",
";",
"checkProperties",
"(",
"consumer",
".",
"getProperties",
"(",
"clone",
")",
",",
"BasicPortletManagementBehavior",
".",
"PROPERTY_VALUE",
")",
";",
"}",
"public",
"void",
"testSetResetSameProperty",
"(",
")",
"throws",
"PortletInvokerException",
"{",
"PortletContext",
"original",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
";",
"PortletContext",
"clone",
"=",
"consumer",
".",
"createClone",
"(",
"PortletStateType",
".",
"OPAQUE",
",",
"original",
")",
";",
"try",
"{",
"consumer",
".",
"setProperties",
"(",
"clone",
",",
"new",
"PropertyChange",
"[",
"]",
"{",
"PropertyChange",
".",
"newUpdate",
"(",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NAME",
",",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NEW_VALUE",
")",
",",
"PropertyChange",
".",
"newReset",
"(",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NAME",
")",
"}",
")",
";",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"assertTrue",
"(",
"e",
".",
"getCause",
"(",
")",
".",
"getLocalizedMessage",
"(",
")",
".",
"contains",
"(",
"BasicPortletManagementBehavior",
".",
"CANNOT_BOTH_SET_AND_RESET_A_PROPERTY_AT_THE_SAME_TIME",
")",
")",
";",
"}",
"}",
"private",
"void",
"checkProperties",
"(",
"PropertyMap",
"props",
",",
"String",
"expectedValue",
")",
"{",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"props",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"1",
",",
"props",
".",
"size",
"(",
")",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"expectedValue",
",",
"props",
".",
"getProperty",
"(",
"BasicPortletManagementBehavior",
".",
"PROPERTY_NAME",
")",
".",
"get",
"(",
"0",
")",
")",
";",
"}",
"public",
"void",
"testDestroyClones",
"(",
")",
"throws",
"Exception",
"{",
"BehaviorRegistry",
"behaviorRegistry",
"=",
"producer",
".",
"getBehaviorRegistry",
"(",
")",
";",
"behaviorRegistry",
".",
"setPortletManagementBehavior",
"(",
"new",
"DestroyClonesPortletManagementBehavior",
"(",
"behaviorRegistry",
")",
")",
";",
"PortletContext",
"original",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
";",
"PortletContext",
"clone",
"=",
"consumer",
".",
"createClone",
"(",
"PortletStateType",
".",
"OPAQUE",
",",
"original",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"clone",
")",
";",
"Portlet",
"portlet",
"=",
"consumer",
".",
"getPortlet",
"(",
"clone",
")",
";",
"ExtendedAssert",
".",
"assertNotNull",
"(",
"portlet",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"BasicPortletManagementBehavior",
".",
"CLONED_HANDLE",
",",
"portlet",
".",
"getContext",
"(",
")",
".",
"getId",
"(",
")",
")",
";",
"List",
"clones",
"=",
"new",
"ArrayList",
"(",
"1",
")",
";",
"clones",
".",
"add",
"(",
"clone",
")",
";",
"List",
"result",
"=",
"consumer",
".",
"destroyClones",
"(",
"clones",
")",
";",
"ExtendedAssert",
".",
"assertTrue",
"(",
"result",
".",
"isEmpty",
"(",
")",
")",
";",
"try",
"{",
"consumer",
".",
"getPortlet",
"(",
"clone",
")",
";",
"ExtendedAssert",
".",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"PortletInvokerException",
"expected",
")",
"{",
"}",
"clone",
"=",
"consumer",
".",
"createClone",
"(",
"PortletStateType",
".",
"OPAQUE",
",",
"original",
")",
";",
"PortletContext",
"invalidContext",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"\"invalid\"",
",",
"false",
")",
";",
"clones",
".",
"add",
"(",
"invalidContext",
")",
";",
"result",
"=",
"consumer",
".",
"destroyClones",
"(",
"clones",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"1",
",",
"result",
".",
"size",
"(",
")",
")",
";",
"DestroyCloneFailure",
"failure",
"=",
"(",
"DestroyCloneFailure",
")",
"result",
".",
"get",
"(",
"0",
")",
";",
"ExtendedAssert",
".",
"assertEquals",
"(",
"\"invalid\"",
",",
"failure",
".",
"getPortletId",
"(",
")",
")",
";",
"try",
"{",
"consumer",
".",
"getPortlet",
"(",
"clone",
")",
";",
"ExtendedAssert",
".",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"PortletInvokerException",
"expected",
")",
"{",
"}",
"}",
"public",
"void",
"testInvalidSetProperties",
"(",
")",
"throws",
"Exception",
"{",
"PortletContext",
"original",
"=",
"PortletContext",
".",
"createPortletContext",
"(",
"BasicMarkupBehavior",
".",
"PORTLET_HANDLE",
",",
"false",
")",
";",
"try",
"{",
"consumer",
".",
"setProperties",
"(",
"original",
",",
"null",
")",
";",
"ExtendedAssert",
".",
"fail",
"(",
"\"\"",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"expected",
")",
"{",
"}",
"}",
"}",
"</s>"
] |
12,383 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlElement",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
",",
"propOrder",
"=",
"{",
"\"\"",
",",
"\"\"",
",",
"\"extensions\"",
"}",
")",
"public",
"class",
"PortletLifetime",
"{",
"@",
"XmlElement",
"(",
"required",
"=",
"true",
")",
"protected",
"PortletContext",
"portletContext",
";",
"@",
"XmlElement",
"(",
"required",
"=",
"true",
")",
"protected",
"Lifetime",
"scheduledDestruction",
";",
"protected",
"List",
"<",
"Extension",
">",
"extensions",
";",
"public",
"PortletContext",
"getPortletContext",
"(",
")",
"{",
"return",
"portletContext",
";",
"}",
"public",
"void",
"setPortletContext",
"(",
"PortletContext",
"value",
")",
"{",
"this",
".",
"portletContext",
"=",
"value",
";",
"}",
"public",
"Lifetime",
"getScheduledDestruction",
"(",
")",
"{",
"return",
"scheduledDestruction",
";",
"}",
"public",
"void",
"setScheduledDestruction",
"(",
"Lifetime",
"value",
")",
"{",
"this",
".",
"scheduledDestruction",
"=",
"value",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"getExtensions",
"(",
")",
"{",
"if",
"(",
"extensions",
"==",
"null",
")",
"{",
"extensions",
"=",
"new",
"ArrayList",
"<",
"Extension",
">",
"(",
")",
";",
"}",
"return",
"this",
".",
"extensions",
";",
"}",
"}",
"</s>"
] |
12,384 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
")",
"public",
"class",
"ExportNoLongerValidFault",
"extends",
"Fault",
"{",
"}",
"</s>"
] |
12,385 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAnyElement",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlRootElement",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"import",
"org",
".",
"w3c",
".",
"dom",
".",
"Element",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
",",
"propOrder",
"=",
"{",
"\"any\"",
"}",
")",
"@",
"XmlRootElement",
"(",
"name",
"=",
"\"\"",
")",
"public",
"class",
"NewNavigationalContextScope",
"{",
"@",
"XmlAnyElement",
"(",
"lax",
"=",
"true",
")",
"protected",
"Object",
"any",
";",
"public",
"Object",
"getAny",
"(",
")",
"{",
"return",
"any",
";",
"}",
"public",
"void",
"setAny",
"(",
"Object",
"value",
")",
"{",
"this",
".",
"any",
"=",
"value",
";",
"}",
"}",
"</s>"
] |
12,386 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlEnum",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlEnumValue",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlType",
"(",
"name",
"=",
"\"StateChange\"",
")",
"@",
"XmlEnum",
"public",
"enum",
"StateChange",
"{",
"@",
"XmlEnumValue",
"(",
"\"readWrite\"",
")",
"READ_WRITE",
"(",
"\"readWrite\"",
")",
",",
"@",
"XmlEnumValue",
"(",
"\"\"",
")",
"CLONE_BEFORE_WRITE",
"(",
"\"\"",
")",
",",
"@",
"XmlEnumValue",
"(",
"\"readOnly\"",
")",
"READ_ONLY",
"(",
"\"readOnly\"",
")",
";",
"private",
"final",
"String",
"value",
";",
"StateChange",
"(",
"String",
"v",
")",
"{",
"value",
"=",
"v",
";",
"}",
"public",
"String",
"value",
"(",
")",
"{",
"return",
"value",
";",
"}",
"public",
"static",
"StateChange",
"fromValue",
"(",
"String",
"v",
")",
"{",
"for",
"(",
"StateChange",
"c",
":",
"StateChange",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"c",
".",
"value",
".",
"equals",
"(",
"v",
")",
")",
"{",
"return",
"c",
";",
"}",
"}",
"throw",
"new",
"IllegalArgumentException",
"(",
"v",
")",
";",
"}",
"}",
"</s>"
] |
12,387 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAttribute",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
",",
"propOrder",
"=",
"{",
"\"extensions\"",
"}",
")",
"public",
"class",
"CCPPProfileDiff",
"{",
"protected",
"List",
"<",
"Extension",
">",
"extensions",
";",
"@",
"XmlAttribute",
"(",
"required",
"=",
"true",
")",
"protected",
"String",
"diffName",
";",
"@",
"XmlAttribute",
"(",
"required",
"=",
"true",
")",
"protected",
"String",
"description",
";",
"public",
"List",
"<",
"Extension",
">",
"getExtensions",
"(",
")",
"{",
"if",
"(",
"extensions",
"==",
"null",
")",
"{",
"extensions",
"=",
"new",
"ArrayList",
"<",
"Extension",
">",
"(",
")",
";",
"}",
"return",
"this",
".",
"extensions",
";",
"}",
"public",
"String",
"getDiffName",
"(",
")",
"{",
"return",
"diffName",
";",
"}",
"public",
"void",
"setDiffName",
"(",
"String",
"value",
")",
"{",
"this",
".",
"diffName",
"=",
"value",
";",
"}",
"public",
"String",
"getDescription",
"(",
")",
"{",
"return",
"description",
";",
"}",
"public",
"void",
"setDescription",
"(",
"String",
"value",
")",
"{",
"this",
".",
"description",
"=",
"value",
";",
"}",
"}",
"</s>"
] |
12,388 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAttribute",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlElement",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
",",
"propOrder",
"=",
"{",
"\"value\"",
",",
"\"extensions\"",
"}",
")",
"public",
"class",
"ResourceValue",
"{",
"@",
"XmlElement",
"(",
"required",
"=",
"true",
")",
"protected",
"String",
"value",
";",
"protected",
"List",
"<",
"Extension",
">",
"extensions",
";",
"@",
"XmlAttribute",
"(",
"namespace",
"=",
"\"\"",
",",
"required",
"=",
"true",
")",
"protected",
"String",
"lang",
";",
"public",
"String",
"getValue",
"(",
")",
"{",
"return",
"value",
";",
"}",
"public",
"void",
"setValue",
"(",
"String",
"value",
")",
"{",
"this",
".",
"value",
"=",
"value",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"getExtensions",
"(",
")",
"{",
"if",
"(",
"extensions",
"==",
"null",
")",
"{",
"extensions",
"=",
"new",
"ArrayList",
"<",
"Extension",
">",
"(",
")",
";",
"}",
"return",
"this",
".",
"extensions",
";",
"}",
"public",
"String",
"getLang",
"(",
")",
"{",
"return",
"lang",
";",
"}",
"public",
"void",
"setLang",
"(",
"String",
"value",
")",
"{",
"this",
".",
"lang",
"=",
"value",
";",
"}",
"}",
"</s>"
] |
12,389 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
")",
"public",
"class",
"ExportByValueNotSupportedFault",
"extends",
"Fault",
"{",
"}",
"</s>"
] |
12,390 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
")",
"public",
"class",
"MissingParametersFault",
"extends",
"Fault",
"{",
"}",
"</s>"
] |
12,391 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
")",
"public",
"class",
"UnsupportedMimeTypeFault",
"extends",
"Fault",
"{",
"}",
"</s>"
] |
12,392 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAttribute",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlSchemaType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"import",
"javax",
".",
"xml",
".",
"namespace",
".",
"QName",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
",",
"propOrder",
"=",
"{",
"\"description\"",
",",
"\"label\"",
",",
"\"hint\"",
",",
"\"usage\"",
",",
"\"aliases\"",
",",
"\"extensions\"",
"}",
")",
"public",
"class",
"PropertyDescription",
"{",
"protected",
"LocalizedString",
"description",
";",
"protected",
"LocalizedString",
"label",
";",
"protected",
"LocalizedString",
"hint",
";",
"protected",
"List",
"<",
"String",
">",
"usage",
";",
"protected",
"List",
"<",
"QName",
">",
"aliases",
";",
"protected",
"List",
"<",
"Extension",
">",
"extensions",
";",
"@",
"XmlAttribute",
"(",
"required",
"=",
"true",
")",
"protected",
"QName",
"name",
";",
"@",
"XmlAttribute",
"(",
"required",
"=",
"true",
")",
"protected",
"QName",
"type",
";",
"@",
"XmlAttribute",
"@",
"XmlSchemaType",
"(",
"name",
"=",
"\"anyURI\"",
")",
"protected",
"String",
"schemaLocation",
";",
"public",
"LocalizedString",
"getDescription",
"(",
")",
"{",
"return",
"description",
";",
"}",
"public",
"void",
"setDescription",
"(",
"LocalizedString",
"value",
")",
"{",
"this",
".",
"description",
"=",
"value",
";",
"}",
"public",
"LocalizedString",
"getLabel",
"(",
")",
"{",
"return",
"label",
";",
"}",
"public",
"void",
"setLabel",
"(",
"LocalizedString",
"value",
")",
"{",
"this",
".",
"label",
"=",
"value",
";",
"}",
"public",
"LocalizedString",
"getHint",
"(",
")",
"{",
"return",
"hint",
";",
"}",
"public",
"void",
"setHint",
"(",
"LocalizedString",
"value",
")",
"{",
"this",
".",
"hint",
"=",
"value",
";",
"}",
"public",
"List",
"<",
"String",
">",
"getUsage",
"(",
")",
"{",
"if",
"(",
"usage",
"==",
"null",
")",
"{",
"usage",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"}",
"return",
"this",
".",
"usage",
";",
"}",
"public",
"List",
"<",
"QName",
">",
"getAliases",
"(",
")",
"{",
"if",
"(",
"aliases",
"==",
"null",
")",
"{",
"aliases",
"=",
"new",
"ArrayList",
"<",
"QName",
">",
"(",
")",
";",
"}",
"return",
"this",
".",
"aliases",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"getExtensions",
"(",
")",
"{",
"if",
"(",
"extensions",
"==",
"null",
")",
"{",
"extensions",
"=",
"new",
"ArrayList",
"<",
"Extension",
">",
"(",
")",
";",
"}",
"return",
"this",
".",
"extensions",
";",
"}",
"public",
"QName",
"getName",
"(",
")",
"{",
"return",
"name",
";",
"}",
"public",
"void",
"setName",
"(",
"QName",
"value",
")",
"{",
"this",
".",
"name",
"=",
"value",
";",
"}",
"public",
"QName",
"getType",
"(",
")",
"{",
"return",
"type",
";",
"}",
"public",
"void",
"setType",
"(",
"QName",
"value",
")",
"{",
"this",
".",
"type",
"=",
"value",
";",
"}",
"public",
"String",
"getSchemaLocation",
"(",
")",
"{",
"return",
"schemaLocation",
";",
"}",
"public",
"void",
"setSchemaLocation",
"(",
"String",
"value",
")",
"{",
"this",
".",
"schemaLocation",
"=",
"value",
";",
"}",
"}",
"</s>"
] |
12,393 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
",",
"propOrder",
"=",
"{",
"\"sessionID\"",
",",
"\"expires\"",
",",
"\"extensions\"",
"}",
")",
"public",
"class",
"SessionContext",
"{",
"protected",
"String",
"sessionID",
";",
"protected",
"Integer",
"expires",
";",
"protected",
"List",
"<",
"Extension",
">",
"extensions",
";",
"public",
"String",
"getSessionID",
"(",
")",
"{",
"return",
"sessionID",
";",
"}",
"public",
"void",
"setSessionID",
"(",
"String",
"value",
")",
"{",
"this",
".",
"sessionID",
"=",
"value",
";",
"}",
"public",
"Integer",
"getExpires",
"(",
")",
"{",
"return",
"expires",
";",
"}",
"public",
"void",
"setExpires",
"(",
"Integer",
"value",
")",
"{",
"this",
".",
"expires",
"=",
"value",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"getExtensions",
"(",
")",
"{",
"if",
"(",
"extensions",
"==",
"null",
")",
"{",
"extensions",
"=",
"new",
"ArrayList",
"<",
"Extension",
">",
"(",
")",
";",
"}",
"return",
"this",
".",
"extensions",
";",
"}",
"}",
"</s>"
] |
12,394 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlElement",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"initCookie\"",
",",
"propOrder",
"=",
"{",
"\"\"",
",",
"\"userContext\"",
"}",
")",
"public",
"class",
"InitCookie",
"{",
"@",
"XmlElement",
"(",
"required",
"=",
"true",
",",
"nillable",
"=",
"true",
")",
"protected",
"RegistrationContext",
"registrationContext",
";",
"@",
"XmlElement",
"(",
"required",
"=",
"true",
",",
"nillable",
"=",
"true",
")",
"protected",
"UserContext",
"userContext",
";",
"public",
"RegistrationContext",
"getRegistrationContext",
"(",
")",
"{",
"return",
"registrationContext",
";",
"}",
"public",
"void",
"setRegistrationContext",
"(",
"RegistrationContext",
"value",
")",
"{",
"this",
".",
"registrationContext",
"=",
"value",
";",
"}",
"public",
"UserContext",
"getUserContext",
"(",
")",
"{",
"return",
"userContext",
";",
"}",
"public",
"void",
"setUserContext",
"(",
"UserContext",
"value",
")",
"{",
"this",
".",
"userContext",
"=",
"value",
";",
"}",
"}",
"</s>"
] |
12,395 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
",",
"propOrder",
"=",
"{",
"\"\"",
",",
"\"resourceList\"",
",",
"\"extensions\"",
"}",
")",
"public",
"class",
"PortletPropertyDescriptionResponse",
"{",
"protected",
"ModelDescription",
"modelDescription",
";",
"protected",
"ResourceList",
"resourceList",
";",
"protected",
"List",
"<",
"Extension",
">",
"extensions",
";",
"public",
"ModelDescription",
"getModelDescription",
"(",
")",
"{",
"return",
"modelDescription",
";",
"}",
"public",
"void",
"setModelDescription",
"(",
"ModelDescription",
"value",
")",
"{",
"this",
".",
"modelDescription",
"=",
"value",
";",
"}",
"public",
"ResourceList",
"getResourceList",
"(",
")",
"{",
"return",
"resourceList",
";",
"}",
"public",
"void",
"setResourceList",
"(",
"ResourceList",
"value",
")",
"{",
"this",
".",
"resourceList",
"=",
"value",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"getExtensions",
"(",
")",
"{",
"if",
"(",
"extensions",
"==",
"null",
")",
"{",
"extensions",
"=",
"new",
"ArrayList",
"<",
"Extension",
">",
"(",
")",
";",
"}",
"return",
"this",
".",
"extensions",
";",
"}",
"}",
"</s>"
] |
12,396 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAnyElement",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlRootElement",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"import",
"org",
".",
"w3c",
".",
"dom",
".",
"Element",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
",",
"propOrder",
"=",
"{",
"\"any\"",
"}",
")",
"@",
"XmlRootElement",
"(",
"name",
"=",
"\"\"",
")",
"public",
"class",
"EventHandlingFailed",
"{",
"@",
"XmlAnyElement",
"(",
"lax",
"=",
"true",
")",
"protected",
"Object",
"any",
";",
"public",
"Object",
"getAny",
"(",
")",
"{",
"return",
"any",
";",
"}",
"public",
"void",
"setAny",
"(",
"Object",
"value",
")",
"{",
"this",
".",
"any",
"=",
"value",
";",
"}",
"}",
"</s>"
] |
12,397 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"MarkupParams\"",
")",
"public",
"class",
"MarkupParams",
"extends",
"MimeRequest",
"{",
"}",
"</s>"
] |
12,398 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlElement",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"Templates\"",
",",
"propOrder",
"=",
"{",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"extensions\"",
"}",
")",
"public",
"class",
"Templates",
"{",
"@",
"XmlElement",
"(",
"required",
"=",
"true",
",",
"nillable",
"=",
"true",
")",
"protected",
"String",
"defaultTemplate",
";",
"protected",
"String",
"blockingActionTemplate",
";",
"protected",
"String",
"renderTemplate",
";",
"protected",
"String",
"resourceTemplate",
";",
"@",
"XmlElement",
"(",
"required",
"=",
"true",
",",
"nillable",
"=",
"true",
")",
"protected",
"String",
"secureDefaultTemplate",
";",
"protected",
"String",
"secureBlockingActionTemplate",
";",
"protected",
"String",
"secureRenderTemplate",
";",
"protected",
"String",
"secureResourceTemplate",
";",
"protected",
"List",
"<",
"Extension",
">",
"extensions",
";",
"public",
"String",
"getDefaultTemplate",
"(",
")",
"{",
"return",
"defaultTemplate",
";",
"}",
"public",
"void",
"setDefaultTemplate",
"(",
"String",
"value",
")",
"{",
"this",
".",
"defaultTemplate",
"=",
"value",
";",
"}",
"public",
"String",
"getBlockingActionTemplate",
"(",
")",
"{",
"return",
"blockingActionTemplate",
";",
"}",
"public",
"void",
"setBlockingActionTemplate",
"(",
"String",
"value",
")",
"{",
"this",
".",
"blockingActionTemplate",
"=",
"value",
";",
"}",
"public",
"String",
"getRenderTemplate",
"(",
")",
"{",
"return",
"renderTemplate",
";",
"}",
"public",
"void",
"setRenderTemplate",
"(",
"String",
"value",
")",
"{",
"this",
".",
"renderTemplate",
"=",
"value",
";",
"}",
"public",
"String",
"getResourceTemplate",
"(",
")",
"{",
"return",
"resourceTemplate",
";",
"}",
"public",
"void",
"setResourceTemplate",
"(",
"String",
"value",
")",
"{",
"this",
".",
"resourceTemplate",
"=",
"value",
";",
"}",
"public",
"String",
"getSecureDefaultTemplate",
"(",
")",
"{",
"return",
"secureDefaultTemplate",
";",
"}",
"public",
"void",
"setSecureDefaultTemplate",
"(",
"String",
"value",
")",
"{",
"this",
".",
"secureDefaultTemplate",
"=",
"value",
";",
"}",
"public",
"String",
"getSecureBlockingActionTemplate",
"(",
")",
"{",
"return",
"secureBlockingActionTemplate",
";",
"}",
"public",
"void",
"setSecureBlockingActionTemplate",
"(",
"String",
"value",
")",
"{",
"this",
".",
"secureBlockingActionTemplate",
"=",
"value",
";",
"}",
"public",
"String",
"getSecureRenderTemplate",
"(",
")",
"{",
"return",
"secureRenderTemplate",
";",
"}",
"public",
"void",
"setSecureRenderTemplate",
"(",
"String",
"value",
")",
"{",
"this",
".",
"secureRenderTemplate",
"=",
"value",
";",
"}",
"public",
"String",
"getSecureResourceTemplate",
"(",
")",
"{",
"return",
"secureResourceTemplate",
";",
"}",
"public",
"void",
"setSecureResourceTemplate",
"(",
"String",
"value",
")",
"{",
"this",
".",
"secureResourceTemplate",
"=",
"value",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"getExtensions",
"(",
")",
"{",
"if",
"(",
"extensions",
"==",
"null",
")",
"{",
"extensions",
"=",
"new",
"ArrayList",
"<",
"Extension",
">",
"(",
")",
";",
"}",
"return",
"this",
".",
"extensions",
";",
"}",
"}",
"</s>"
] |
12,399 | [
"<s>",
"package",
"org",
".",
"oasis",
".",
"wsrp",
".",
"v2",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAccessorType",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlAttribute",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlElement",
";",
"import",
"javax",
".",
"xml",
".",
"bind",
".",
"annotation",
".",
"XmlType",
";",
"@",
"XmlAccessorType",
"(",
"XmlAccessType",
".",
"FIELD",
")",
"@",
"XmlType",
"(",
"name",
"=",
"\"\"",
",",
"propOrder",
"=",
"{",
"\"description\"",
",",
"\"displayName\"",
",",
"\"extensions\"",
"}",
")",
"public",
"class",
"ItemDescription",
"{",
"@",
"XmlElement",
"(",
"required",
"=",
"true",
",",
"nillable",
"=",
"true",
")",
"protected",
"LocalizedString",
"description",
";",
"protected",
"LocalizedString",
"displayName",
";",
"protected",
"List",
"<",
"Extension",
">",
"extensions",
";",
"@",
"XmlAttribute",
"(",
"required",
"=",
"true",
")",
"protected",
"String",
"itemName",
";",
"public",
"LocalizedString",
"getDescription",
"(",
")",
"{",
"return",
"description",
";",
"}",
"public",
"void",
"setDescription",
"(",
"LocalizedString",
"value",
")",
"{",
"this",
".",
"description",
"=",
"value",
";",
"}",
"public",
"LocalizedString",
"getDisplayName",
"(",
")",
"{",
"return",
"displayName",
";",
"}",
"public",
"void",
"setDisplayName",
"(",
"LocalizedString",
"value",
")",
"{",
"this",
".",
"displayName",
"=",
"value",
";",
"}",
"public",
"List",
"<",
"Extension",
">",
"getExtensions",
"(",
")",
"{",
"if",
"(",
"extensions",
"==",
"null",
")",
"{",
"extensions",
"=",
"new",
"ArrayList",
"<",
"Extension",
">",
"(",
")",
";",
"}",
"return",
"this",
".",
"extensions",
";",
"}",
"public",
"String",
"getItemName",
"(",
")",
"{",
"return",
"itemName",
";",
"}",
"public",
"void",
"setItemName",
"(",
"String",
"value",
")",
"{",
"this",
".",
"itemName",
"=",
"value",
";",
"}",
"}",
"</s>"
] |
Subsets and Splits