Package jadex.base

Class SRemoteGui


  • public class SRemoteGui
    extends java.lang.Object
    Helper class for GUI code to be executed on remote devices (e.g. android.).
    • Constructor Detail

      • SRemoteGui

        public SRemoteGui()
    • Method Detail

      • isComponentStepNecessary

        public static boolean isComponentStepNecessary​(IComponentIdentifier target)
        Check if a component is necessary.
        Parameters:
        target - The target component identifier.
        Returns:
        The
      • getServiceInfos

        public static IFuture<java.lang.Object[]> getServiceInfos​(IExternalAccess ea)
        Get the service infos for a component.
        Parameters:
        ea - The component access.
        Returns:
        The provided and required service infos.
      • localizeModel

        public static IFuture<Tuple2<java.lang.String,​java.lang.String>> localizeModel​(IExternalAccess platformaccess,
                                                                                             java.lang.String name,
                                                                                             IResourceIdentifier rid)
        Localize a model name. The result can be e.g. used to save settings.
        Returns:
        A tuple with the relative local model name and the relative local RID URL.
      • createResourceIdentifier

        public static IFuture<IResourceIdentifier> createResourceIdentifier​(IExternalAccess platformaccess,
                                                                            java.lang.String ridurl,
                                                                            java.lang.String globalrid)
        Create a resource identifier.
        Parameters:
        ridurl - The (possibly relative) local RID URL.
        globalrid - The global RID, if any.
        Returns:
        A valid RID for the platform.
      • getFileData

        public static IFuture<FileData> getFileData​(IExternalAccess platformaccess,
                                                    java.lang.String path)
        Get the file info of a remote path.
      • removeURL

        public static IFuture<java.lang.Void> removeURL​(IExternalAccess access,
                                                        java.lang.String path)
        Remove a URL from the lib service.
      • findChild

        public static IFuture<java.lang.Integer> findChild​(IExternalAccess access,
                                                           java.lang.String toremove,
                                                           java.util.List<java.lang.String> filenames)
        Find an entry in a list of URLs. Tests canonical paths on the remote system.
      • checkExistence

        public static IIntermediateFuture<FileData> checkExistence​(java.lang.String[] files,
                                                                   IExternalAccess exta)
        Check remote files for existence.
        Parameters:
        files - The files to check.
        Returns:
        All checked files that exist.
      • convertPathsToRelative

        public static IIntermediateFuture<java.lang.String> convertPathsToRelative​(java.lang.String[] paths,
                                                                                   IExternalAccess exta)
        Convert the given paths to relative paths.
        Parameters:
        paths - The paths
        Returns:
        The relative paths.
      • listFiles

        public static IIntermediateFuture<FileData> listFiles​(FileData dir,
                                                              IAsyncFilter filter)
        List files in a directory matching a filter (if any).
        Parameters:
        dir - The directory.
        filter - The filter or null for all files.
      • parseArgs

        public static IFuture<java.util.Map<java.lang.String,​java.lang.Object>> parseArgs​(java.util.Map<java.lang.String,​java.lang.String> rawargs,
                                                                                                IResourceIdentifier modelrid,
                                                                                                IExternalAccess exta)
      • matchModel

        public static IFuture<java.lang.Boolean> matchModel​(java.lang.String path,
                                                            java.lang.String model,
                                                            IExternalAccess exta)
        Compare a model to a path.
      • logWarning

        public static IFuture<java.lang.Void> logWarning​(java.lang.String msg,
                                                         IExternalAccess exta)
        Log a warning on a component.
      • redirectInput

        public static void redirectInput​(IExternalAccess access,
                                         java.lang.String txt)
        Redirect some text to the remote input stream.
      • removeConsoleListener

        public static void removeConsoleListener​(IExternalAccess platformaccess,
                                                 java.lang.String id)