Hi Vijitha, On Wed, Feb 29, 2012 at 6:20 PM, Vijitha Kumara <viji...@wso2.com> wrote:
> > Greetings All, > > With regards to the JIRA[1] the task is to let the user clean the entire > Version History of a given resource. And I'm taking in to consideration the > schema where the version is being stored here... > > According to my current understanding with the Registry Schema, below > questions need some clarifications/approval: > > > 1. REG_RESOURCE contains the latest version? So this can be leave as is? > > +1 > > > 2. According to the schema we have REG_RESOURCE_HISTORY, > REG_CONTENT_HISTORY which are history tables so that all the records > related to the resource can be removed? > > Not all records, but records before a particular revision number. Its up to the consumer of the API (remote client or GUI) to set this to the latest revision number which would then mean that everything gets cleared. > > > *And below other tables also contain version specific data, hence we need > to clean up those as well...* > > 3. We'll have to remove all the comments form REG_COMMENT, > REG_RESOURCE_COMMENT tables related to all the versions being deleted > > In the scope of a given resource/collection - yes. > > > 4. Also the REG_PROPERTY, REG_RESOURCE_PROPERTY, we'll have to delete all > the versions except the latest. > > 5. All the ratings for the previous versions form REG_RATING, > REG_RESOURCE_RATING be removed > > 6. All the tags for the previous versions REG_TAG, REG_RESOURCE_TAG be > removed. > > Yes to all above in the same sense as for comments. > > > 7. What's going to happen to the REG_LOG, are we going to remove all the > log related to the particular resource? (something like keeping the latest > dated log for that resource and remove everything else). According to the > schema it doesn't seems to have any version specific info but the generic > action performed etc... > > This should not be removed. REG_LOG maintains audit logs and they should remain. A new log type should also be created to accomodate this functionality - should be done in the same way as for createVersion. > > > *Development point of View* > > 1. Where this needs to be added in the GReg UI? To what level we are going > to apply this function initially? > > In the resource browser, you can go to the "View Versions" for a resource/collection. An should be listed against each displayed version to clear the version history including that version and all previous versions. > > > 2. Can we use the "executeQuery()" API to these operations or should there > be a new API created in the core? (This involves multiple tuples being > removed in multiple tables). > > No you cannot, and should not. > > > 3. There seems to be some API's like (restoreVersion()) methods (and may > be more?), so If we remove all the version history how these existing > methods should react? > > This would be an addition to the Registry interface, and until implemented the implementations related to the remote APIs, Atom/WS, can throw an unsupported operation exception. We can create an improvement to implement this for remote APIs and finish that of now (if time permits) or later. > > > 4. For example in Properties/Tags etc... it is possible to set the > versioning to either true or false, so in case of the latter how version > history of these gets removed? > > If versioning is false, no need to run the query, if it is true you need to. Thanks, Senaka. > > > > And please add If I have missed anything related to this... > > > [1] https://wso2.org/jira/browse/REGISTRY-658 > > > > -- > Vijitha Kumara > Senior Software Engineer; WSO2, Inc.; http://wso2.com/ > email: viji...@wso2.com > > Lean . Enterprise . Middleware > > > _______________________________________________ > Carbon-dev mailing list > Carbon-dev@wso2.org > http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- *Senaka Fernando* Product Manager - WSO2 Governance Registry; Associate Technical Lead; WSO2 Inc.; http://wso2.com* Member; Apache Software Foundation; http://apache.org E-mail: senaka AT wso2.com **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818 Linked-In: http://linkedin.com/in/senakafernando *Lean . Enterprise . Middleware
_______________________________________________ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev