Re: [Architecture] [APIM][C5] Subesource access permissions in store

2017-05-18 Thread Fazlan Nazeem
Hi Sanjeewa, In facebook, if someone posts a comment on our post, then we have the permission to delete that comment even though that comment was not created by us. In a similar manner, shouldn't we at least support delete comment permission to a moderator role(api owner or a configurable moderat

Re: [Architecture] [MB] Best Approach to write unit tests for DAO Layer ?

2017-05-18 Thread Malaka Gangananda
Hi, Actually JavaDB do have network drivers [1]. [1] http://db.apache.org/derby/papers/DerbyTut/ns_intro.html Thanks, On Fri, May 19, 2017 at 11:35 AM, Uvindra Dias Jayasinha wrote: > FYI let me give some details regarding how we are testing the APIM DAO > layer for C5. > > 1. The DAO layer

Re: [Architecture] [MB] Best Approach to write unit tests for DAO Layer ?

2017-05-18 Thread Fazlan Nazeem
To add to Uvindra and Darshana's comments. Trying to run integration test with a specific db will only validate that our code functions well with that specific db. With the docker image approach, we can validate our code functions properly with all those databases. On Fri, May 19, 2017 at 11:35 A

Re: [Architecture] [MB] Best Approach to write unit tests for DAO Layer ?

2017-05-18 Thread Uvindra Dias Jayasinha
FYI let me give some details regarding how we are testing the APIM DAO layer for C5. 1. The DAO layer is an interface that the rest of our code interacts with in order to store and retrieve data. We mock the DOA layer and can control its behaviour to unit test how the rest of our code behaves when

Re: [Architecture] [PET] Microsoft Dynamics CRM Connector

2017-05-18 Thread Kanapriya Kuleswararajan
Hi All, In MicrosoftDynamicCRM, there is a method to create [1], update, delete entities and etc. But each entity has different or dynamic set of parameters [2]. Due to that , Now I'm planning to implement the connector by getting the entity type and required payload for that specific entity from

Re: [Architecture] [MB] Best Approach to write unit tests for DAO Layer ?

2017-05-18 Thread Dharshana Warusavitharana
Hi All, The correct approach for unit test is to mock DB layer using Mockito or Jmockit. Not introduce DB layer. Anyway, you have to write set of integration test to test actual functionality with actual DB and the actual end to end use case. But the correct approach is to mock the DB layer just

Re: [Architecture] [APIM][C5] Subesource access permissions in store

2017-05-18 Thread Sanjeewa Malalgoda
Can anyone point me any site/forum which allow you to edit others comment(not approve/reject or delete entire comment). I'm just curious :) Think what will happen when someone comment on your blogs, media etc(or even you can think of product comments of most common e commerce platforms). It will g

Re: [Architecture] [APIM][C5] Subesource access permissions in store

2017-05-18 Thread Nuwan Dias
I think standard forums allow privileged users to moderate comments. Moderation can be in the form of approving/rejecting comments or in the form of removing obscene type of comments. If we go down the workflow (approval) path, there's much to implement. Ex: We need to introduce a "state" to the c

Re: [Architecture] [APIM][C5] Subesource access permissions in store

2017-05-18 Thread Bhathiya Jayasekara
On Fri, May 19, 2017 at 10:52 AM, Sanjeewa Malalgoda wrote: > > > On Fri, May 19, 2017 at 10:43 AM, Bhathiya Jayasekara > wrote: > >> Hi Sanjeewa, >> >> On Thu, May 18, 2017 at 5:09 PM, Sanjeewa Malalgoda >> wrote: >> >>> I don't think its worth to get complete permission model for comments as

Re: [Architecture] [MB] Best Approach to write unit tests for DAO Layer ?

2017-05-18 Thread Sanjiva Weerawarana
I didn't realize there was a version of Derby in the JDK! Yes we should support it as a real DB now and can we even use it in production?? That would be awesome as it'll reduce complexity for smaller deployments - just download and run. Earlier IIRC Derby didn't have networked drivers and therefor

Re: [Architecture] [APIM][C5] Subesource access permissions in store

2017-05-18 Thread Sanjeewa Malalgoda
On Fri, May 19, 2017 at 10:43 AM, Bhathiya Jayasekara wrote: > Hi Sanjeewa, > > On Thu, May 18, 2017 at 5:09 PM, Sanjeewa Malalgoda > wrote: > >> I don't think its worth to get complete permission model for comments as >> well. Like bhathiya mentioned only comment owner is allowed to >> update/d

Re: [Architecture] [APIM][C5] Removing "Blocked" state from API lifecycle

2017-05-18 Thread Nuwan Dias
These APIs are consumed by Apps. Apps don't understand what "Blocked" means. If an API is blocked, an App will throw an error irrespective of what the error response is. I'm pretty sure no one writes an App expecting an API to be blocked. In that case the only user set to whom this error response

Re: [Architecture] C5 Modifying OSGi bundle deployment logic to support temporary patches (log patches, etc)

2017-05-18 Thread Jayanga Dissanayake
Hi Vidura, Adding a separate command line would easily lead to more human errors. With C5, we are trying to minimize the configurations, command line parameters, etc. to make the users' life easier and to reduce the human errors much as possible. Log patch is just a one case I highlighted. There a

Re: [Architecture] [APIM][C5] Subesource access permissions in store

2017-05-18 Thread Bhathiya Jayasekara
Hi Sanjeewa, On Thu, May 18, 2017 at 5:09 PM, Sanjeewa Malalgoda wrote: > I don't think its worth to get complete permission model for comments as > well. Like bhathiya mentioned only comment owner is allowed to > update/delete his comment. That is the normal behavior. Also i feel its > better i

Re: [Architecture] [APIM][C5] Removing "Blocked" state from API lifecycle

2017-05-18 Thread Ishara Cooray
The provided workarounds for blocking an api is fine with respect to developer p.o.v But is it providing the proper end user experience? End user(who is invoking the api) will not see the correct error message unless it has sent a customized error messages for this blocking scenario. Will not this

Re: [Architecture] Force Delete Identity Providers

2017-05-18 Thread Malithi Edirisinghe
On Fri, May 19, 2017 at 9:19 AM, Ishara Karunarathna wrote: > > > On Fri, May 19, 2017 at 1:15 AM, Malithi Edirisinghe > wrote: > >> Hi All, >> >> So in order to support force delete an identity provider, we have to >> first identify the places the respective identity provider can be referred >>

Re: [Architecture] [APIM][C5] Removing "Blocked" state from API lifecycle

2017-05-18 Thread Nuwan Dias
Blocking an API temporarily can be a valid scenario. And we already have 3 ways of doing it (1 for admin 2 for API developer). What I'm saying is that "Blocked" is never a standard state in any SDLC. So what's so special about an API LC? It is true that older versions of the product had this as a L

Re: [Architecture] [APIM][C5] Removing "Blocked" state from API lifecycle

2017-05-18 Thread Yasima Dewmini
On Thu, May 18, 2017 at 3:44 PM, Lakshman Udayakantha wrote: > Hi, > > Don't we have an extensible API lifecycle states in c5 implementation? If > we have any user who doesn't want this blocked state can remove from state > configuration and who wants this blocked state can keep this state in > c

Re: [Architecture] [APIM][C5] Removing "Blocked" state from API lifecycle

2017-05-18 Thread Lalaji Sureshika
Hi, If we remove the 'blocked' state from API lifecycle and if we keep the other options [set throttling limit/ballerina config change] to do API blocking,we will loose setting workflow extension to the particular blocked state.[Eg scenario-acknowledge users that API is temporally blocked via a c

Re: [Architecture] [MB] Best Approach to write unit tests for DAO Layer ?

2017-05-18 Thread Asanka Abeyweera
Does this mean we are adding Derby to the list of supported RDBMS for MB 4.0.0? On Fri, May 19, 2017 at 9:05 AM, Pumudu Ruhunage wrote: > Can we consider javaDB(Derby)[1] which is part of JDK. since it's shipped > with jdk, it'll be more suitable for unit tests instead of going for > external da

Re: [Architecture] Force Delete Identity Providers

2017-05-18 Thread Ishara Karunarathna
On Fri, May 19, 2017 at 1:15 AM, Malithi Edirisinghe wrote: > Hi All, > > So in order to support force delete an identity provider, we have to first > identify the places the respective identity provider can be referred and > then we need to decide on the options we have, on removing those refere

Re: [Architecture] [MB] Best Approach to write unit tests for DAO Layer ?

2017-05-18 Thread Pumudu Ruhunage
Can we consider javaDB(Derby)[1] which is part of JDK. since it's shipped with jdk, it'll be more suitable for unit tests instead of going for external databases/frameworks. Since we are not using any vendor-specific sql's in DAO it should support all required sql syntaxes without any issue. [1] h

Re: [Architecture] [MB] Best Approach to write unit tests for DAO Layer ?

2017-05-18 Thread Pamod Sylvester
(+) Adding @architecture On Thu, May 18, 2017 at 11:34 AM, Asanka Abeyweera wrote: > Are we planning to use stored procedures? If yes better to use a framework > that is flexible enough. > > On Thu, May 18, 2017 at 10:59 AM, Ramith Jayasinghe > wrote: > >> if you want to mess with the database/

Re: [Architecture] Force Delete Identity Providers

2017-05-18 Thread Malithi Edirisinghe
Hi All, So in order to support force delete an identity provider, we have to first identify the places the respective identity provider can be referred and then we need to decide on the options we have, on removing those references. Basically, an identity provider is referred by a service provider

Re: [Architecture] [APIM][C5] Subesource access permissions in store

2017-05-18 Thread Sanjeewa Malalgoda
I don't think its worth to get complete permission model for comments as well. Like bhathiya mentioned only comment owner is allowed to update/delete his comment. That is the normal behavior. Also i feel its better if we can have work flow support for comments(by default this need to disabled). Onc

Re: [Architecture] [APIM][C5] Removing "Blocked" state from API lifecycle

2017-05-18 Thread Lakshman Udayakantha
Hi, Don't we have an extensible API lifecycle states in c5 implementation? If we have any user who doesn't want this blocked state can remove from state configuration and who wants this blocked state can keep this state in configuration. WDYT? Thanks, Lakshman On Thu, May 18, 2017 at 3:22 PM, Nu

Re: [Architecture] [APIM][C5] Removing "Blocked" state from API lifecycle

2017-05-18 Thread Nuwan Dias
If by any chance an API Developer wants to block his entire API temporarily, he has two options. 1) Set the endpoint limit to 0req/min 2) Use a temporary ballerina to send an error back to the customer. On Thu, May 18, 2017 at 12:06 PM, Sanjeewa Malalgoda wrote: > > > On Wed, May 17, 2017 at 12

Re: [Architecture] Force Delete Identity Providers

2017-05-18 Thread Prabath Siriwardena
On Thu, May 18, 2017 at 12:09 AM, Ishara Karunarathna wrote: > Hi, > > On Wed, May 17, 2017 at 10:14 PM, Prabath Siriwardena > wrote: > >> At the moment we can't delete an identity provider, if its associated >> with one or more service providers. >> >> Also - for the user there is no way to fin

Re: [Architecture] Force Delete Identity Providers

2017-05-18 Thread Ishara Karunarathna
Hi, On Wed, May 17, 2017 at 10:14 PM, Prabath Siriwardena wrote: > At the moment we can't delete an identity provider, if its associated with > one or more service providers. > > Also - for the user there is no way to find out the associated service > providers for a given identity provider - wi