@Override
    public  String getRemoteDirForNode(
            final INodeEntry node,
            final IRundeckProject project,
            final IFramework framework
    )
    {
        String pathSeparator = "/";
        String remotedir = "/tmp/";
        String osfamily = null != node.getOsFamily() ? node.getOsFamily().trim().toLowerCase() : "unix";
        if ("windows".equalsIgnoreCase(osfamily)) {
            pathSeparator = "\\";
            remotedir = "C:\\WINDOWS\\TEMP\\";
        }
        //node specific
        if (null != node.getAttributes() && null != node.getAttributes().get(FILE_COPY_DESTINATION_DIR)) {
            String s = node.getAttributes().get(FILE_COPY_DESTINATION_DIR);
            return s.endsWith(pathSeparator) ? s : s + pathSeparator;
        }
        //project, os-specific
        if (null != project && project.hasProperty(PROJECT_FILE_COPY_DESTINATION_DIR + "." + osfamily)) {
            String s = project.getProperty(PROJECT_FILE_COPY_DESTINATION_DIR + "." + osfamily);
            return s.endsWith(pathSeparator) ? s : s + pathSeparator;
        }
        //project specific
        if (null != project && project.hasProperty(PROJECT_FILE_COPY_DESTINATION_DIR)) {
            String s = project.getProperty(PROJECT_FILE_COPY_DESTINATION_DIR);
            return s.endsWith(pathSeparator) ? s : s + pathSeparator;
        }
        //framework, os-specific
        if (null != framework && framework.getPropertyLookup().hasProperty(
                FRAMEWORK_FILE_COPY_DESTINATION_DIR +
                "." +
                osfamily
        )) {
            String s = framework.getPropertyLookup().getProperty(FRAMEWORK_FILE_COPY_DESTINATION_DIR + "." + osfamily);
            return s.endsWith(pathSeparator) ? s : s + pathSeparator;
        }
        //framework specific
        if (null != framework && framework.getPropertyLookup().hasProperty(FRAMEWORK_FILE_COPY_DESTINATION_DIR)) {
            String s = framework.getPropertyLookup().getProperty(FRAMEWORK_FILE_COPY_DESTINATION_DIR);
            return s.endsWith(pathSeparator) ? s : s + pathSeparator;
        }
        //default

        return remotedir;
    }
@ Override public String getRemoteDirForNode ( final INodeEntry node , final IRundeckProject project , final IFramework framework ) { String pathSeparator = "/" ; String remotedir = "/tmp/" ; String osfamily = null != node . getOsFamily ( ) ? node . getOsFamily ( ) . trim ( ) . toLowerCase ( ) : "unix" ; if ( "windows" . equalsIgnoreCase ( osfamily ) ) { pathSeparator = "\\" ; remotedir = "C:\\WINDOWS\\TEMP\\" ; } if ( null != node . getAttributes ( ) && null != node . getAttributes ( ) . get ( FILE_COPY_DESTINATION_DIR ) ) { String s = node . getAttributes ( ) . get ( FILE_COPY_DESTINATION_DIR ) ; return s . endsWith ( pathSeparator ) ? s : s + pathSeparator ; } if ( null != project && project . hasProperty ( PROJECT_FILE_COPY_DESTINATION_DIR + "." + osfamily ) ) { String s = project . getProperty ( PROJECT_FILE_COPY_DESTINATION_DIR + "." + osfamily ) ; return s . endsWith ( pathSeparator ) ? s : s + pathSeparator ; } if ( null != project && project . hasProperty ( PROJECT_FILE_COPY_DESTINATION_DIR ) ) { String s = project . getProperty ( PROJECT_FILE_COPY_DESTINATION_DIR ) ; return s . endsWith ( pathSeparator ) ? s : s + pathSeparator ; } if ( null != framework && framework . getPropertyLookup ( ) . hasProperty ( FRAMEWORK_FILE_COPY_DESTINATION_DIR + "." + osfamily ) ) { String s = framework . getPropertyLookup ( ) . getProperty ( FRAMEWORK_FILE_COPY_DESTINATION_DIR + "." + osfamily ) ; return s . endsWith ( pathSeparator ) ? s : s + pathSeparator ; } if ( null != framework && framework . getPropertyLookup ( ) . hasProperty ( FRAMEWORK_FILE_COPY_DESTINATION_DIR ) ) { String s = framework . getPropertyLookup ( ) . getProperty ( FRAMEWORK_FILE_COPY_DESTINATION_DIR ) ; return s . endsWith ( pathSeparator ) ? s : s + pathSeparator ; } return remotedir ; }
Return a remote destination temp dir path for the given node.  If specified, the node attribute named {@value
#FILE_COPY_DESTINATION_DIR} is used, otherwise a temp directory appropriate for the os-family of the node is
returned.

@param node the node entry
@param project project
@param framework framework

@return a path to destination dir for the node