All pastes #446778 Raw Edit

Untitled

public text v1 · immutable
·published 2007-04-18 17:38 UTC
rendered paste body
	/**
	* createAsset
	*
	* Create an asset placeholder in the EMS repository.
	* 
	* @throws Exception
	*/
	public void createAsset()
	throws Exception
	{
        // Acquire handles to managers
        AssetManager assetManager = Connector.getAssetManager();
        
        // Initialize parameters for EMS calls
        Map metadata = new HashMap();
        Collection metadataTemplateList = new ArrayList();
        String assetVersionUuid;
        
        // Create some asset placeholders
        assetVersionUuid = assetManager.createAsset(m_userAuth,
                                                    AssetType.IMAGE,
                                                    "Test Asset Placeholder",
                                                    "JUnit created Asset with no file.",
                                                    m_userAuth.getOrgUuid(),
                                                    metadataTemplateList,
                                                    metadata);
        cleanupAssetUuids.add(assetVersionUuid);
	}