It's all about the answers!

Ask a question

Removing artifact from asset

Chamal Panditharatne (111) | asked Oct 09 '19, 5:32 a.m.
edited Oct 09 '19, 5:33 a.m.

 RAM - The following code snippet attempts to delete an artifact from an asset.  It runs without throwing any errors, but it does not actually delete the artifact.  Anyone know what I am doing wrong?

    RAMAsset asset = allMyAssets.get(1);

    try {
        session = new RAMSession(url, user, pass);
        RAMFolderArtifact root = (RAMFolderArtifact) asset.getArtifactsRoot();
        Artifact[] artifacts2 = root.getChildren();

        System.out.println( root.removeArtifact(artifacts2[0]) );  

        session.putAssets(new NullProgressMonitor());

    } catch (RAMRuntimeException e) {

    } catch (IOException e) {

One answer

permanent link
Chamal Panditharatne (111) | answered Oct 09 '19, 11:49 a.m.

 Looks like there is no problem with my code but a serious problem with the instance of RAM i am trying to run it against.  Oh well....

Your answer

Register or to post your answer.