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