[ 
https://issues.apache.org/jira/browse/JCRVLT-193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tobias Bocanegra updated JCRVLT-193:
------------------------------------
    Description: 
see JCRVLT-188:

I would appreciate a high level API like boolean 
JcrPackageManager.exists(Archive) which works on those properties to determine 
whether an archive (local or remote) is uploaded already in the remote 
repository. 

To achieve that it should work as follows:
- extract the PID and the created date from the given archive
- try to find a package in the package manager with the same pid
- if there is a package compare its created date with the created date from the 
archive and only return true if both are equal. This method should not consider 
at all if the package in the repository is installed or not (i.e. shouldn't 
care about JcrPackage.isInstalled(), because this is mainly used to determine 
whether the upload should be triggered.


maybe an utility class instead?

{code}
public final class PackageUtils {

public boolean exists(JcrPackageManager, Archive)

}
{code}

  was:see JCRVLT-188


> Add utility class to help checking installation requirements
> ------------------------------------------------------------
>
>                 Key: JCRVLT-193
>                 URL: https://issues.apache.org/jira/browse/JCRVLT-193
>             Project: Jackrabbit FileVault
>          Issue Type: Bug
>          Components: Packaging
>            Reporter: Tobias Bocanegra
>
> see JCRVLT-188:
> I would appreciate a high level API like boolean 
> JcrPackageManager.exists(Archive) which works on those properties to 
> determine whether an archive (local or remote) is uploaded already in the 
> remote repository. 
> To achieve that it should work as follows:
> - extract the PID and the created date from the given archive
> - try to find a package in the package manager with the same pid
> - if there is a package compare its created date with the created date from 
> the archive and only return true if both are equal. This method should not 
> consider at all if the package in the repository is installed or not (i.e. 
> shouldn't care about JcrPackage.isInstalled(), because this is mainly used to 
> determine whether the upload should be triggered.
> maybe an utility class instead?
> {code}
> public final class PackageUtils {
> public boolean exists(JcrPackageManager, Archive)
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to