It's all about the answers!

Ask a question

Removing artifact from asset


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

 RAM 7.5.3.1 - 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.queueAssetForPut(asset);
        session.putAssets(new NullProgressMonitor());
        
        session.release();

    } catch (RAMRuntimeException e) {
        e.printStackTrace();

    } catch (IOException e) {
        e.printStackTrace();
    }


One answer



permanent link
Chamal Panditharatne (111) | answered Oct 09, 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.