Class Sftp3gppUtils
- java.lang.Object
-
- org.opennms.protocols.xml.collector.Sftp3gppUtils
-
public abstract class Sftp3gppUtils extends Object
The Class Sftp3gppUtils.- Author:
- Alejandro Galue
-
-
Field Summary
Fields Modifier and Type Field Description static String
PM_GROUPS_FILENAME
The Constant PM_GROUPS_FILENAME.static String
XML_LAST_FILENAME
The Constant XML_LAST_FILENAME.
-
Constructor Summary
Constructors Constructor Description Sftp3gppUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
deleteFile(Sftp3gppUrlConnection connection, String fileName)
Safely delete file on remote node.static String
get3gppFormat(String resourceType)
Gets the 3GPP resource format.static Map<String,String>
get3gppProperties(String format, String measInfoId)
Gets the 3GPP properties based on measInfoId.static String
getCacheId(ResourcePath path, String serviceName, String targetPath)
Gets the cache id.static String
getLastFilename(BlobStore blobStore, String serviceName, ResourcePath path, String targetPath)
Gets the last filename.static void
processXmlResource(CollectionSetBuilder builder, Resource resource, String resourceTypeName, String group)
Process xml resource.static void
setLastFilename(BlobStore blobStore, String serviceName, ResourcePath path, String targetPath, String filename)
Sets the last filename.
-
-
-
Field Detail
-
PM_GROUPS_FILENAME
public static final String PM_GROUPS_FILENAME
The Constant PM_GROUPS_FILENAME.- See Also:
- Constant Field Values
-
XML_LAST_FILENAME
public static final String XML_LAST_FILENAME
The Constant XML_LAST_FILENAME.- See Also:
- Constant Field Values
-
-
Method Detail
-
getLastFilename
public static String getLastFilename(BlobStore blobStore, String serviceName, ResourcePath path, String targetPath) throws Exception
Gets the last filename.- Parameters:
serviceName
- the service nameresourceDir
- the resource directorytargetPath
- the target path- Returns:
- the last filename
- Throws:
Exception
- the exception
-
setLastFilename
public static void setLastFilename(BlobStore blobStore, String serviceName, ResourcePath path, String targetPath, String filename) throws Exception
Sets the last filename.- Parameters:
serviceName
- the service nameresourceDir
- the resource directorytargetPath
- the target pathfilename
- the filename- Throws:
Exception
- the exception
-
getCacheId
public static String getCacheId(ResourcePath path, String serviceName, String targetPath)
Gets the cache id.- Parameters:
serviceName
- the service nametargetPath
- the target path- Returns:
- the cache id
-
deleteFile
public static void deleteFile(Sftp3gppUrlConnection connection, String fileName)
Safely delete file on remote node.- Parameters:
connection
- the SFTP URL ConnectionfileName
- the file name
-
processXmlResource
public static void processXmlResource(CollectionSetBuilder builder, Resource resource, String resourceTypeName, String group)
Process xml resource.- Parameters:
resource
- the resourceattribGroupType
- the attrib group type
-
get3gppFormat
public static String get3gppFormat(String resourceType)
Gets the 3GPP resource format.- Parameters:
resourceType
- the resource type- Returns:
- the 3gpp format
-
-