Examples of Attributes


Examples of org.gatein.mop.api.Attributes

                     UIContainer dstDashboard = session.findObjectById(ObjectType.CONTAINER, app.getStorageId());
                     data = loadDashboard(dstDashboard);

                     // Update those attributes as we have to do it now, they don't exist in a container
                     // but do exist in a dashboard container
                     Attributes attrs = dstDashboard.getAttributes();
                     attrs.setValue(MappedAttributes.SHOW_INFO_BAR, app.isShowInfoBar());
                     attrs.setValue(MappedAttributes.SHOW_MODE, app.isShowApplicationMode());
                     attrs.setValue(MappedAttributes.SHOW_WINDOW_STATE, app.isShowApplicationState());
                     attrs.setValue(MappedAttributes.THEME, app.getTheme());
                  }
                  else
                  {
                     data = DashboardData.INITIAL_DASHBOARD;
                  }
View Full Code Here

Examples of org.gatein.mop.api.Attributes

      }
   }

   private <S> ApplicationData<S> load(UIWindow src)
   {
      Attributes attrs = src.getAttributes();

      //
      Customization<?> customization = src.getCustomization();

      //
      ContentType<?> contentType = customization.getType();

      //
      String customizationid = customization.getId();

      // julien: should type check that
      ApplicationType<S> type = (ApplicationType<S>)ApplicationType.getType(contentType);

      //
      PersistentApplicationState<S> instanceState = new PersistentApplicationState<S>(customizationid);

      //
      HashMap<String, String> properties = new HashMap<String, String>();
      load(attrs, properties, windowPropertiesBlackList);

      //
      List<String> accessPermissions = Collections.emptyList();
      if (src.isAdapted(ProtectedResource.class))
      {
         ProtectedResource pr = src.adapt(ProtectedResource.class);
         accessPermissions = pr.getAccessPermissions();
      }

      //
      Described described = src.adapt(Described.class);

      //
      boolean showInfoBar = attrs.getValue(MappedAttributes.SHOW_INFO_BAR, false);
      boolean showWindowState = attrs.getValue(MappedAttributes.SHOW_WINDOW_STATE, false);
      boolean showMode = attrs.getValue(MappedAttributes.SHOW_MODE, false);
      String theme = attrs.getValue(MappedAttributes.THEME, null);

      //
      return new ApplicationData<S>(
         src.getObjectId(),
         src.getName(),
         type,
         instanceState,
         null,
         described.getName(),
         attrs.getValue(MappedAttributes.ICON),
         described.getDescription(),
         showInfoBar,
         showWindowState,
         showMode,
         theme,
         attrs.getValue(MappedAttributes.WIDTH),
         attrs.getValue(MappedAttributes.HEIGHT),
         Utils.safeImmutableMap(properties),
         Utils.safeImmutableList(accessPermissions)
      );
   }
View Full Code Here

Examples of org.gatein.mop.api.Attributes

      Described described = dst.adapt(Described.class);
      described.setName(src.getTitle());
      described.setDescription(src.getDescription());

      //
      Attributes attrs = dst.getAttributes();
      attrs.setValue(MappedAttributes.SHOW_INFO_BAR, src.isShowInfoBar());
      attrs.setValue(MappedAttributes.SHOW_WINDOW_STATE, src.isShowApplicationState());
      attrs.setValue(MappedAttributes.SHOW_MODE, src.isShowApplicationMode());
      attrs.setValue(MappedAttributes.THEME, src.getTheme());
      attrs.setValue(MappedAttributes.ICON, src.getIcon());
      attrs.setValue(MappedAttributes.WIDTH, src.getWidth());
      attrs.setValue(MappedAttributes.HEIGHT, src.getHeight());
      save(src.getProperties(), attrs, windowPropertiesBlackList);

      //
      ApplicationState<S> instanceState = src.getState();
View Full Code Here

Examples of org.gatein.mop.api.Attributes

      //
      Described described = container.adapt(Described.class);

      //
      Attributes attrs = container.getAttributes();
      List<ComponentData> children = loadChildren(container);
      return new DashboardData(
         container.getObjectId(),
         attrs.getValue(MappedAttributes.ID),
         attrs.getValue(MappedAttributes.NAME),
         attrs.getValue(MappedAttributes.ICON),
         attrs.getValue(MappedAttributes.TEMPLATE),
         attrs.getValue(MappedAttributes.FACTORY_ID),
         described.getName(),
         described.getDescription(),
         attrs.getValue(MappedAttributes.WIDTH),
         attrs.getValue(MappedAttributes.HEIGHT),
         Utils.safeImmutableList(accessPermissions),
         children
      );
   }
View Full Code Here

Examples of org.gephi.graph.api.Attributes

                    switch (event.getEventType()) {
                        case REMOVE_EDGES:
                            if (!edgeDynamicColumns.isEmpty()) {
                                AttributeColumn[] dynamicCols = edgeDynamicColumns.toArray(new AttributeColumn[0]);
                                for (Edge e : event.getData().removedEdges()) {
                                    Attributes attributeRow = e.getEdgeData().getAttributes();
                                    for (int i = 0; i < dynamicCols.length; i++) {
                                        DynamicType<?> ti = (DynamicType) attributeRow.getValue(dynamicCols[i].getIndex());
                                        if (ti != null) {
                                            for (Interval interval : ti.getIntervals(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY)) {
                                                timeIntervalIndex.remove(interval);
                                            }
                                        }
                                    }
                                }
                            }
                            break;
                        case REMOVE_NODES:
                            if (!nodeDynamicColumns.isEmpty()) {
                                AttributeColumn[] dynamicCols = edgeDynamicColumns.toArray(new AttributeColumn[0]);
                                for (Node n : event.getData().removedNodes()) {
                                    Attributes attributeRow = n.getNodeData().getAttributes();
                                    for (int i = 0; i < dynamicCols.length; i++) {
                                        DynamicType<?> ti = (DynamicType) attributeRow.getValue(dynamicCols[i].getIndex());
                                        if (ti != null) {
                                            for (Interval interval : ti.getIntervals(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY)) {
                                                timeIntervalIndex.remove(interval);
                                            }
                                        }
View Full Code Here

Examples of org.glassfish.security.services.api.common.Attributes

            throw new IllegalArgumentException(localStrings.getLocalString("service.resource_null", "The supplied Resource is null."));
        }

        // TODO: setup current AzEnvironment instance. Should a null or empty instance to represent current environment?
        final AzEnvironment env = new AzEnvironmentImpl();
        final Attributes attrs = securityContextService.getEnvironmentAttributes();
        for (String attrName : attrs.getAttributeNames()) {
            env.addAttribute(attrName, attrs.getAttributeValue(attrName), true);
        }

        AzResult result =  provider.getAuthorizationDecision(
            subject, resource, action, env, attributeResolvers );
View Full Code Here

Examples of org.gradle.api.java.archives.Attributes

        return manifest;
    }

    private void addPlainAttributesAndSections(DefaultManifest manifest) {
        manifest.getAttributes().put(ARBITRARY_ATTRIBUTE, "I like green eggs and ham.");
        Attributes sectionAtts = new DefaultAttributes();
        sectionAtts.put(ANOTHER_ARBITRARY_ATTRIBUTE, "Death is the great equalizer.");
        manifest.getSections().put(ARBITRARY_SECTION, sectionAtts);
    }
View Full Code Here

Examples of org.gwtoolbox.commons.collections.client.attributes.Attributes



            Class clazz = definition.getValidatorClass();
            writer.println("        Map<String, Object> attributes" + i + " = new HashMap<String, Object>();");
            Attributes attributes = definition.getAttributes();
            for (String name : attributes.getNames()) {
                Object value = attributes.get(name);
                indent(writer, 3);
                String varName = writeAnnotationValue(writer, context, value);
                outdent(writer, 3);
                writer.println("        attributes" + i + ".put(\"" + name + "\", " + varName + ");");
            }
View Full Code Here

Examples of org.hibernate.jpamodelgen.xml.jaxb.Attributes

    this.clazzName = ormEntity.getClazz();
    this.packageName = packageName;
    this.context = context;
    this.importContext = new ImportContextImpl( getPackageName() );
    this.element = element;
    Attributes attributes = ormEntity.getAttributes();

    parseAttributes( attributes );
  }
View Full Code Here

Examples of org.jsoup.nodes.Attributes

    }
    Element body = doc.select("body").first();
    if (session == 0) {
      session = System.currentTimeMillis();
      body.appendElement("br");
      Element sess = new Element(Tag.valueOf("div"), "", new Attributes());
      sess.addClass("session");
      sess.attr("id", String.valueOf(session));
      sess.append("Session started on " + new java.util.Date());
      body.appendChild(sess);
      body.appendElement("br");
      if (s.equals("")) {
        saveLogFile(doc);
        return;
      }
    }
    Element cursession = doc.select("#" + session).first();
    if (cursession == null)
      return;

    Element timestamp = new Element(Tag.valueOf("span"), "",
        new Attributes());
    timestamp.addClass("timestamp");
    if (!s.equals(""))
      timestamp.append(new java.util.Date().toString());

    String userNick = s.trim().split(" ")[0];

    if (s.startsWith("<" + this.getChannelName() + ">")
        || userNick.contains(".") || s.startsWith("<SYSTEM>")) {
      Element system = new Element(Tag.valueOf("div"), "",
          new Attributes());
      system.addClass("system");

      Element systemmsg = new Element(Tag.valueOf("span"), "",
          new Attributes());
      systemmsg.addClass("system-msg");
      systemmsg.append(s.replaceAll("<", "&lt;"));

      system.appendChild(timestamp);
      system.appendChild(systemmsg);

      body.appendChild(system);

    } else {
      // TODO use default user timestamp format
      // TODO format links and quicklinks in html log
      Element message = new Element(Tag.valueOf("div"), "",
          new Attributes());
      message.addClass("message" + (alternateMessage ? "-alt" : ""));

      Element nick = new Element(Tag.valueOf("span"), "",
          new Attributes());
      nick.addClass("nick"
          + (userNick.contains(getBot().getNick()) ? "-me" : ""));
      nick.append(userNick.replaceAll("<", "&lt;"));

      message.appendChild(timestamp);
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.