Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Bloco de código
languagexml
themeEclipse
titlesettings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
	<mirrors>
		<mirror>
			<id>nexus</id>
			<mirrorOf>*</mirrorOf>
			<name>Fluig Nexus Repository.</name>
			<url>http://nexus.fluig.com/content/groups/public</url>
		</mirror>
	</mirrors>
</settings>

 

  • Configurar o componente fluig-sdk-api no classpath.
  • No caso de criação de um novo projeto WEB ou Widget, seguir o seguinte padrão de projeto Maven fluigsdk.sample.
  • O novo projeto Maven deve ter por padrão as seguintes configurações no pom.xml:
Deck of Cards
effectDuration0.5
historyfalse
idsamples1
effectTypefade
Card
id1
labelfluig 1.6
Bloco de código
languagexml
themeEclipse
titlepom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.fluig</groupId>
				<artifactId>fluig-sdk-bom</artifactId>
				<version>1.6.0</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
 		<dependencies>		
		<dependency>
			<groupId>com.fluig</groupId>
			<artifactId>fluig-sdk-api</artifactId>
		</dependency>
		<dependency>
			<groupId>com.fluig</groupId>
			<artifactId>fluig-sdk-common</artifactId>
		</dependency>
		<dependency>
			<groupId>javax</groupId>
			<artifactId>javaee-api</artifactId>
			<scope>provided</scope>
		</dependency>
	</dependencies>
	<build>
		<finalName>fluigsdk.sample</finalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
					<failOnMissingWebXml>false</failOnMissingWebXml>
					<archive>
						<manifestEntries>
							<Dependencies>org.slf4j, com.fluig.api, com.fluig.api.common</Dependencies>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>

 

 

Card
id2
labelfluig 1.5.13
Bloco de código
languagexml
themeEclipse
titlepom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.fluig</groupId>
				<artifactId>fluig-sdk-bom</artifactId>
				<version>1.5.0</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
 		<dependencies>
		<dependency>
			<groupId>com.fluig</groupId>
			<artifactId>foundation-security-authentication-saml</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.fluig</groupId>
			<artifactId>fluig-sdk-api</artifactId>
		</dependency>
		<dependency>
			<groupId>com.fluig</groupId>
			<artifactId>fluig-sdk-common</artifactId>
		</dependency>
		<dependency>
			<groupId>javax</groupId>
			<artifactId>javaee-api</artifactId>
			<scope>provided</scope>
		</dependency>
	</dependencies>
	<build>
		<finalName>fluigsdk.sample</finalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
					<failOnMissingWebXml>false</failOnMissingWebXml>
					<archive>
						<manifestEntries>
							<Dependencies>org.slf4j, com.fluig.api, com.fluig.api.common</Dependencies>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>

...

  • Se atentar para as configurações padrão de autenticação e security-role localizadas no jboss-web.xml e web.xml conforme abaixo:
Deck of Cards
effectDuration0.5
historyfalse
idsamples2
effectTypefade
Card
id1
labelfluig 1.6
Bloco de código
languagexml
themeEclipse
titlejboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
	<context-root>/sample</context-root>
	<disable-cross-context>false</disable-cross-context>
	<security-domain>TOTVSTech</security-domain>
	<security-role>
		<role-name>user</role-name>
		<principal-name>totvstech</principal-name>
	</security-role>
	<security-role>
		<role-name>totvstech</role-name>
		<principal-name>totvstech</principal-name>
	</security-role>
	<security-role>
		<role-name>sysadmin</role-name>
		<principal-name>wcmadmin</principal-name>
	</security-role>
	<security-role>
		<role-name>admin</role-name>
		<principal-name>wcmadmin</principal-name>
	</security-role>	
</jboss-web>

 

 

Card
id2
labelfluig 1.5.13
Bloco de código
languagexml
themeEclipse
titlejboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
	<context-root>/sample</context-root>
	<disable-cross-context>false</disable-cross-context>
	<security-domain>TOTVSTech</security-domain>
	<security-role>
		<role-name>user</role-name>
		<principal-name>totvstech</principal-name>
	</security-role>
	<security-role>
		<role-name>totvstech</role-name>
		<principal-name>totvstech</principal-name>
	</security-role>
	<security-role>
		<role-name>sysadmin</role-name>
		<principal-name>wcmadmin</principal-name>
	</security-role>
	<security-role>
		<role-name>admin</role-name>
		<principal-name>wcmadmin</principal-name>
	</security-role>
	<valve>
		<class-name>com.totvs.technology.auth.saml.TOTVSAuthenticatorValve</class-name>
	</valve>
</jboss-web>

...

  • No arquivo web.xml:
Deck of Cards
effectDuration0.5
historyfalse
idsamples3
effectTypefade
Card
id1
labelfluig 1.6
Bloco de código
languagexml
themeEclipse
titleweb.xml
<security-constraint>
		<display-name>REST</display-name>
		<web-resource-collection>
			<web-resource-name>REST</web-resource-name>
			<description>REST</description>
			<url-pattern>/api/rest/*</url-pattern>
		</web-resource-collection>
		<auth-constraint>
			<description>REST</description>
			<role-name>user</role-name>
		</auth-constraint>
	</security-constraint>
	<login-config>
		<auth-method>FORM,FLUIGAUTH</auth-method>
		<realm-name>TOTVSTech</realm-name>
		<form-login-config>
			<form-login-page>/login.jsp</form-login-page>
			<form-error-page>/loginfail.jsp</form-error-page>
		</form-login-config>
	</login-config>
 
	<security-role>
		<role-name>totvstech</role-name>
	</security-role>
	<security-role>
		<role-name>user</role-name>
	</security-role>
	<security-role>
		<role-name>sysadmin</role-name>
	</security-role>
Card
id2
labelfluig 1.5.13
Bloco de código
languagexml
themeEclipse
titleweb.xml
<security-role>
		<role-name>totvstech</role-name>
	</security-role>
	<security-role>
		<role-name>user</role-name>
	</security-role>
	<security-role>
		<role-name>sysadmin</role-name>
	</security-role>

...

  • Realizar lookup do serviço via ServiceLocator. Seguir padrão da Super Classe fluigAPI.

...