19 package org.turro.sso;
21 import java.util.List;
22 import org.turro.auth.Authentication;
23 import org.turro.elephant.db.ElephantPU;
24 import org.turro.elephant.db.WhereClause;
25 import org.turro.elephant.entities.db.SSOIdentity;
26 import org.turro.jpa.Dao;
27 import org.turro.plugin.contacts.IContact;
28 import org.zkoss.bind.annotation.BindingParam;
29 import org.zkoss.bind.annotation.Command;
30 import org.zkoss.bind.annotation.ExecutionArgParam;
31 import org.zkoss.bind.annotation.Init;
32 import org.zkoss.bind.annotation.NotifyChange;
44 if(contact !=
null) this.contact = contact;
49 public
void delete(@BindingParam("entity") Object entity) {
57 wc.
addClause(
"select sso from SSOIdentity as sso");
58 wc.
addClause(
"where idContact = :idContact");
60 return getDao().getResultList(wc);
64 String userAgent = identity.
getDetails().toLowerCase();
65 if (userAgent.contains(
"windows")) {
67 }
else if (userAgent.contains(
"mac")) {
69 }
else if (userAgent.contains(
"x11") || userAgent.contains(
"ubuntu")) {
71 }
else if (userAgent.contains(
"android")) {
73 }
else if (userAgent.contains(
"iphone")) {
84 private Dao getDao() {
static IContact getIContact()
void addClause(String clause)
void addNamedValue(String name, Object value)
void deleteObject(Object obj)
List< SSOIdentity > getModel()
void delete(@BindingParam("entity") Object entity)
void init(@ExecutionArgParam("contact") IContact contact)
String getIcon(SSOIdentity identity)