org.opennms.gwt.web.ui.asset.server
Class AssetServiceImpl

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.opennms.gwt.web.ui.asset.server.AssetServiceImpl
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, AssetService

@Transactional(readOnly=false)
public class AssetServiceImpl
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements AssetService

Author:
Ronny Trommer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
AssetServiceImpl()
           
 
Method Summary
 AssetCommand getAssetByNodeId(int nodeId)
          Calling this method will return a AssetCommand with contains all asset data and additional data for GWT asset ui.
 AssetRecordDao getAssetRecordDao()
           getAssetRecordDao
 AssetSuggCommand getAssetSuggestions()
          Calling this method will return an AssetSuggCommand that contains all suggestions for all FieldSetSuggestBoxes at the GWT asset ui.
 NodeDao getNodeDao()
           getNodeDao
 Boolean saveOrUpdateAssetByNodeId(int nodeId, AssetCommand assetCommand)
          Calling this method will save or update a OnmsAsset by the given AssetCommand.
 void setAssetRecordDao(AssetRecordDao m_assetRecordDao)
           setAssetRecordDao
 void setNodeDao(NodeDao m_nodeDao)
           setNodeDao
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetServiceImpl

public AssetServiceImpl()
Method Detail

getAssetByNodeId

public AssetCommand getAssetByNodeId(int nodeId)
Calling this method will return a AssetCommand with contains all asset data and additional data for GWT asset ui. If no OnmsNode is found by given nodeId a exception will occur.

Specified by:
getAssetByNodeId in interface AssetService
Parameters:
nodeId - related to OnmsNode.
Returns:
AssetCommand by the given nodeId

getAssetSuggestions

public AssetSuggCommand getAssetSuggestions()
Calling this method will return an AssetSuggCommand that contains all suggestions for all FieldSetSuggestBoxes at the GWT asset ui.

Specified by:
getAssetSuggestions in interface AssetService
Returns:
AssetSuggCommand

saveOrUpdateAssetByNodeId

public Boolean saveOrUpdateAssetByNodeId(int nodeId,
                                         AssetCommand assetCommand)
Calling this method will save or update a OnmsAsset by the given AssetCommand. Problems will be thrown as exceptions.

Specified by:
saveOrUpdateAssetByNodeId in interface AssetService
Parameters:
nodeId - related to OnmsNode.
Returns:
If the operation went well result will be true, if not false.

getAssetRecordDao

public AssetRecordDao getAssetRecordDao()

getAssetRecordDao

Returns:
assetRecordDao a OnmsAssetRecord

setAssetRecordDao

public void setAssetRecordDao(AssetRecordDao m_assetRecordDao)

setAssetRecordDao

Parameters:
m_assetRecordDao - a OnmsAssetRecord

getNodeDao

public NodeDao getNodeDao()

getNodeDao

Returns:
m_nodeDao a NodeDao

setNodeDao

public void setNodeDao(NodeDao m_nodeDao)

setNodeDao

Parameters:
m_nodeDao - a NodeDao


Copyright © 2011. All Rights Reserved.