Skip to content

Instantly share code, notes, and snippets.

View romartin's full-sized avatar

Roger Martínez romartin

  • RedHat
  • Barcelona
View GitHub Profile
/*
* Copyright 2015 JBoss, by Red Hat, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2015 JBoss, by Red Hat, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
package org.uberfire.ext.wirez.bpmn.api;
import org.jboss.errai.common.client.api.annotations.Portable;
import org.uberfire.ext.wirez.bpmn.api.property.BPMNBasePropertyPack;
import org.uberfire.ext.wirez.bpmn.api.property.BPMNBgColorPropertyPack;
import org.uberfire.ext.wirez.bpmn.api.property.BgColorProperty;
import org.uberfire.ext.wirez.bpmn.api.role.*;
import org.uberfire.ext.wirez.core.api.factory.DefaultNodeFactory;
import org.uberfire.ext.wirez.core.api.graph.DefaultEdge;
import org.uberfire.ext.wirez.core.api.graph.DefaultNode;
/**
* The gallery perspective.
*/
@ApplicationScoped
@WorkbenchPerspective(identifier = "DisplayerGalleryPerspective")
public class DisplayerGalleryPerspective {
@Perspective
public PerspectiveDefinition buildPerspective() {
testDoDeploy(org.dashbuilder.dataset.DataSetDefDeployerTest) Time elapsed: 0.005 sec <<< FAILURE!
java.lang.AssertionError: expected null, but was:<UUID=salesPerYear
Provider=BEAN
Public=true
Push enabled=true
Push max size=1024 Kb
Generator class=org.dashbuilder.dataprovider.SalesPerYearDataSetGenerator
Generator multiplier=1
>
at org.junit.Assert.fail(Assert.java:88)
/*
Copyright (c) 2014,2015,2016 Ahome' Innovation Technologies. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
/*
Copyright (c) 2014,2015,2016 Ahome' Innovation Technologies. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
private void setupMenu() {
final MenuFactory.TopLevelMenusBuilder<MenuFactory.MenuBuilder> builder = newTopLevelMenu("Home").respondsWith(new Command() {
@Override
public void execute() {
placeManager.goTo(new DefaultPlaceRequest("HomePerspective"));
}
}).endMenu();
if (userSystemManager.isActive()) {
builder.newTopLevelMenu("Users management").respondsWith(new Command() {
// Check that roles registered in the framework are created as realm groups as well, if not they cannot be used, as it couldn't be assigned.
protected Set<Role> getRegisteredRoles() {
final Set<Role> result = new LinkedHashSet<Role>();
final Set<Role> registeredRoles = SecurityManagementUtils.getRegisteredRoles();
if ( null != registeredRoles && !registeredRoles.isEmpty() ) {
GroupManager groupManager = userSystemManager.groups();
for (final Role registeredRole : registeredRoles) {
try {
// If the groupManager does not found the role name, it will throw an exception,
// so the role will be not added into the resulting list.
The POJO:
**********
@Definition ( id ="startEvent" )
public class StartEvent .... {
@Property NameProperty nameProperty;
.... etc