Examples of Metainfo


Examples of org.olat.core.commons.modules.bc.meta.MetaInfo

       
        si = new SubscriptionInfo(new TitleItem(translator.translate(getNotificationHeaderKey(), new String[]{displayName}), getCssClassIcon() ), null);
        SubscriptionListItem subListItem;
        for (Iterator<FileInfo> it_infos = fInfos.iterator(); it_infos.hasNext();) {
              FileInfo fi = it_infos.next();
              MetaInfo metaInfo = fi.getMetaInfo();
              String filePath = fi.getRelPath();
              if(isLogDebugEnabled()) logDebug("filePath=", filePath);
              String fullUserName = getUserNameFromFilePath(filePath);
             
              Date modDate = fi.getLastModified();
              String desc = translator.translate(getNotificationEntryKey(), new String[] { filePath, fullUserName });
              String urlToSend = NotificationHelper.getURLFromBusinessPathString(p, p.getBusinessPath());
             
              String iconCssClass =  null;
              if (metaInfo != null) {
                iconCssClass = metaInfo.getIconCssClass();
              }
              subListItem = new SubscriptionListItem(desc, urlToSend, modDate, iconCssClass);
              si.addSubscriptionListItem(subListItem);           
            }
      } else {
View Full Code Here

Examples of org.olat.core.commons.modules.bc.meta.MetaInfo

        si = new SubscriptionInfo(getTitleItem(p, translator), null);
        SubscriptionListItem subListItem;
        for (Iterator<FileInfo> it_infos = fInfos.iterator(); it_infos.hasNext();) {
          FileInfo fi = it_infos.next();
          String title = fi.getRelPath();
          MetaInfo metaInfo = fi.getMetaInfo();
          String iconCssClass =  null;
          if (metaInfo != null) {
            if (metaInfo.getTitle() != null) {
              title += " (" + metaInfo.getTitle() + ")";
            }
            iconCssClass = metaInfo.getIconCssClass();
          }
          Identity ident = fi.getAuthor();
          Date modDate = fi.getLastModified();

          String desc = translator.translate("notifications.entry", new String[] { title, NotificationHelper.getFormatedName(ident) });
View Full Code Here

Examples of org.qi4j.api.common.MetaInfo

    public MetaInfo getMetaInfo( AccessibleObject accessor )
    {
        for( Map.Entry<Class<?>, InfoHolder<?>> entry : mixinPropertyDeclarations.entrySet() )
        {
            InfoHolder<?> holder = entry.getValue();
            MetaInfo metaInfo = holder.getMetaInfo( accessor );
            if( metaInfo != null )
            {
                Class<?> mixinType = entry.getKey();
                return metaInfo.withAnnotations( mixinType )
                    .withAnnotations( accessor )
                    .withAnnotations( accessor instanceof Method ? ((Method)accessor).getReturnType() : ((Field)accessor).getType() );
            }
        }
        // TODO is this code reached at all??
        Class<?> declaringType = ((Member)accessor).getDeclaringClass();
        return new MetaInfo().withAnnotations( declaringType )
            .withAnnotations( accessor )
            .withAnnotations( accessor instanceof Method ? ((Method)accessor).getReturnType() : ((Field)accessor).getType() );
    }
View Full Code Here

Examples of org.qi4j.api.common.MetaInfo

        public MixinDeclaration<T> setMetaInfo( Object info )
        {
            if( metaInfo == null )
            {
                metaInfo = new MetaInfo();
            }
            metaInfo.set( info );
            return this;
        }
View Full Code Here

Examples of org.qi4j.api.common.MetaInfo

    public MetaInfo metaInfo()
    {
        if( metaInfo == null )
        {
            metaInfo = new MetaInfo();
        }

        return metaInfo;
    }
View Full Code Here

Examples of org.qi4j.api.common.MetaInfo

            {
                if (type.equals( ValueComposite.class ))
                {
                    // Create default model
                    MixinsModel mixinsModel = new MixinsModel();
                    model = new ValueModel( ValueComposite.class, (Iterable) Iterables.iterable(ValueComposite.class), Visibility.application, new MetaInfo( ), mixinsModel, new ValueStateModel( new PropertiesModel(), new AssociationsModel(), new ManyAssociationsModel() ), new CompositeMethodsModel( mixinsModel ) );
                } else
                    throw new InvalidApplicationException("["+module.name()+"] Could not find ValueComposite of type "+type);
            }

            return model.valueType();
View Full Code Here

Examples of org.qi4j.api.common.MetaInfo

        this.stateDeclarations = stateDeclarations;
        try
        {
            this.helper = helper;

            metaInfo = new MetaInfo( metaInfo ).withAnnotations( compositeType );
            addAnnotationsMetaInfo( compositeType, metaInfo );

            immutable = metaInfo.get( Immutable.class ) != null;
            propertiesModel = new PropertiesModel();
            stateModel = new StateModel( propertiesModel );
View Full Code Here

Examples of org.qi4j.api.common.MetaInfo

    }

    public ApplicationInstance newInstance( Qi4j runtime, Object... importedServiceInstances )
        throws InvalidApplicationException
    {
        MetaInfo instanceMetaInfo = new MetaInfo( metaInfo );
        for( Object importedServiceInstance : importedServiceInstances )
        {
            instanceMetaInfo.set( importedServiceInstance );
        }

        ApplicationInstance applicationInstance = new ApplicationInstance( this, (Qi4jRuntime) runtime, instanceMetaInfo );

        // Create layer instances
View Full Code Here

Examples of org.qi4j.api.common.MetaInfo

            ImportedServiceModel serviceModel = new ImportedServiceModel( serviceType,
                                                                          visibility,
                                                                          serviceProvider,
                                                                          id,
                                                                          new MetaInfo( metaInfo ).withAnnotations( serviceType ),
                                                                          moduleAssembly.name() );
            serviceModels.add( serviceModel );
        }
        catch( Exception e )
        {
View Full Code Here

Examples of org.qi4j.api.common.MetaInfo

                }
            }
            if( !found )
            {
                Class<? extends ServiceImporter> serviceFactoryType = importedServiceModel.serviceImporter();
                ObjectModel objectModel = new ObjectModel( serviceFactoryType, Visibility.module, new MetaInfo() );
                objectModels.add( objectModel );
            }
        }

        return moduleModel;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.