Hi Nila,

As we discussed offline, shall we go for a approach where we delete
certificates inline, one by one.
Rather than keeping deleted list of certificates and newly added in memory
and removing/adding them at the SP update will make the page stateful. And
may introduce complexities to the user experience.

Thanks!
-Ayesha

On Mon, Jul 2, 2018 at 2:09 PM, Nilasini Thirunavukkarasu <[email protected]
> wrote:

> +dev
>
> On Mon, Jul 2, 2018 at 2:06 PM, Nilasini Thirunavukkarasu <
> [email protected]> wrote:
>
>> Hi,
>>
>> I am working on a UI change to support multiple certificate to IDP.
>> According to my current implementation if we upload the multiple
>> certificates the UI will look like as below. According to the discussion
>> [1] suggested change is to have a delete option for each certificate
>> separately rather than having one delete option.
>>
>>
>> ​
>>
>> With the suggested changes UI will look similar to following.
>>
>>
>> ​
>> Now we need to have a track on which table got deleted (This is not the
>> case previously because previously delete means there is no remaining
>> certificate since only one certificate can be uploaded).
>>
>> In order to have a track on which table got deleted, I am introducing a
>> HashMap which contains tableId as the key and certificate as the value[2].
>> So once we delete the table, then using the tableId we could find which
>> certificate was deleted and what are the remaining certificates.
>>
>> In order to do that I am sending a HashMap object to a form as in [3].
>> When it coming to backend, the HashMap object came as a byte array[4].
>>
>> I couldn't use deserialization as in [5]. It gives
>>
>> "Method threw 'java.io.StreamCorruptedException' exception."
>> Cause :- "java.io.StreamCorruptedException: invalid stream header:
>> 5B6F626A"
>>
>> I have tried [6] as well. That also doesn't give proper solution.
>>
>> Is there any other approach to do the above requirement?, Is it possible
>> to get the HashMap object from the byte array?.
>>
>> Could anyone please help me to solve this issue?
>>
>>
>> [1] Updated invitation: Support secondary certificate for IDP @ Tue Jun
>> 26, 2018 2:30pm - 4pm (IST) (IAM team)
>>
>> [2] https://github.com/nilasini/carbon-identity-framework/bl
>> ob/WIP/components/idp-mgt/org.wso2.carbon.idp.mgt.ui/src/
>> main/resources/web/idpmgt/idp-mgt-edit.jsp#L3311-L3319
>>
>> [3] https://github.com/nilasini/carbon-identity-framework/bl
>> ob/WIP/components/idp-mgt/org.wso2.carbon.idp.mgt.ui/src/
>> main/resources/web/idpmgt/idp-mgt-edit.jsp#L1728-L1736
>>
>> [4] https://github.com/nilasini/carbon-identity-framework/bl
>> ob/WIP/components/idp-mgt/org.wso2.carbon.idp.mgt.ui/src/
>> main/java/org/wso2/carbon/idp/mgt/ui/util/IdPManagementUIUtil.java#L124
>>
>> [5] https://github.com/nilasini/carbon-identity-framework/bl
>> ob/WIP/components/idp-mgt/org.wso2.carbon.idp.mgt.ui/src/
>> main/java/org/wso2/carbon/idp/mgt/ui/util/IdPManagementUIUti
>> l.java#L313-L330
>>
>> [6] https://coderanch.com/t/647594/java/Split-byte-array-HashMap
>>
>> Thanks,
>> Nila.
>>
>> --
>> Nilasini Thirunavukkarasu
>> Software Engineer - WSO2
>>
>> Email : [email protected]
>> Mobile : +94775241823
>> Web : http://wso2.com/
>>
>>
>> <http://wso2.com/signature>
>>
>
>
>
> --
> Nilasini Thirunavukkarasu
> Software Engineer - WSO2
>
> Email : [email protected]
> Mobile : +94775241823
> Web : http://wso2.com/
>
>
> <http://wso2.com/signature>
>



-- 
*Ayesha Dissanayaka*
Senior Software Engineer,
WSO2, Inc : http://wso2.com
<http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg>
20, Palm grove Avenue, Colombo 3
E-Mail: [email protected] <[email protected]>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to