Class SComponentFactory


  • public class SComponentFactory
    extends java.lang.Object
    Standard meta component factory. Uses several sub factories and uses them according to their order and isLoadable() method.
    • Field Detail

      • DEFAULT_FEATURES

        public static final java.util.Collection<IComponentFeatureFactory> DEFAULT_FEATURES
        The default component features.
    • Constructor Detail

      • SComponentFactory

        public SComponentFactory()
    • Method Detail

      • orderComponentFeatures

        public static java.util.Collection<IComponentFeatureFactory> orderComponentFeatures​(java.lang.String name,
                                                                                            java.util.Collection<java.util.Collection<IComponentFeatureFactory>> facss)
        Build an ordered list of component features.
        Parameters:
        facss - A list of component feature lists.
        Returns:
        An ordered list of component features.
      • isComponentStepNecessary

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

        public static <T> IResultListener<T> createResultListener​(IResultListener<T> listener,
                                                                  IExternalAccess ea)
        Create a result listener which is executed as an component step.
        Parameters:
        The - original listener to be called.
        Returns:
        The listener.
      • isLoadable

        public static IFuture<java.lang.Boolean> isLoadable​(IExternalAccess exta,
                                                            java.lang.String model,
                                                            IResourceIdentifier rid)
        Test if a model can be loaded by the factory.
        Parameters:
        model - The model.
        Returns:
        True, if model can be loaded.
      • isModelType

        public static IFuture<java.lang.Boolean> isModelType​(IExternalAccess exta,
                                                             java.lang.String model,
                                                             IResourceIdentifier rid)
        Test if a model can be loaded by the factory.
        Parameters:
        model - The model.
        Returns:
        True, if model can be loaded.
      • isStartable

        public static IFuture<java.lang.Boolean> isStartable​(IExternalAccess exta,
                                                             java.lang.String model,
                                                             IResourceIdentifier rid)
        Test if a model is startable (e.g. a component).
        Parameters:
        model - The model.
        Returns:
        True, if startable (and should therefore also be loadable).
      • getFileTypeIcon

        public static IFuture<byte[]> getFileTypeIcon​(IExternalAccess exta,
                                                      java.lang.String type)
        Get a default icon for a file type.
      • getProperty

        public static IFuture<java.lang.Object> getProperty​(IExternalAccess exta,
                                                            java.lang.String type,
                                                            java.lang.String key)
        Get a default icon for a file type.
      • reorderMultiFactory

        protected static java.util.Collection<IComponentFactory> reorderMultiFactory​(java.util.Collection<IComponentFactory> facs)
        Exclude the multifactory from a collection.
        Parameters:
        facs - The factories.
        Returns:
        cleaned collection.