public void addContextChangeVetoer( ContextChangeVetoer listener ) { if ( contextChangeVetoers == null ) { contextChangeVetoers = new ContextChangeVetoerCollection(); } contextChangeVetoers.add( listener ); }
private boolean contains( TYPE type, List<TYPE> typeList ) { for ( TYPE t : typeList ) { if ( t.equals( type ) ) { return true; } } return false; }
public static UISupportRegistery getInstance() { if ( instance == null ) { instance = new UISupportRegistery(); } return instance; }
private void registerUISuppportForRepositoryExplorer() { UISupportRegistery.getInstance().registerUISupport( IRevisionService.class, RevisionsUISupport.class ); UISupportRegistery.getInstance().registerUISupport( IAclService.class, AclUISupport.class ); UISupportRegistery.getInstance().registerUISupport( IConnectionAclService.class, ConnectionAclUISupport.class ); UISupportRegistery.getInstance().registerUISupport( IRoleSupportSecurityManager.class, ManageRolesUISupport.class ); UISupportRegistery.getInstance().registerUISupport( IAbsSecurityManager.class, AbsSecurityManagerUISupport.class ); UISupportRegistery.getInstance().registerUISupport( IAbsSecurityProvider.class, AbsSecurityProviderUISupport.class ); UISupportRegistery.getInstance().registerUISupport( ITrashService.class, TrashUISupport.class ); UISupportRegistery.getInstance().registerUISupport( ILockService.class, RepositoryLockUISupport.class ); }
public void initControllers( Repository rep ) throws ControllerInitializationException { for ( String name : controllerNames ) { try { IUISupportController controller = (IUISupportController) container.getEventHandler( name ); controller.init( rep ); } catch ( XulException e ) { throw new ControllerInitializationException( e ); } } }
@Override public void init( Repository repository ) throws ControllerInitializationException { super.init( repository ); try { trashService = (ITrashService) repository.getService( ITrashService.class ); } catch ( Throwable e ) { throw new ControllerInitializationException( e ); } }
public void removeContextChangeVetoer( ContextChangeVetoer listener ) { if ( contextChangeVetoers != null ) { contextChangeVetoers.remove( listener ); } }
/** * Fire all current {@link ContextChangeVetoer}. Every one who has added their self as a vetoer has a change to vote * on what should happen. */ List<TYPE> pollContextChangeVetoResults() { if ( contextChangeVetoers != null ) { return contextChangeVetoers.fireContextChange(); } else { List<TYPE> returnValue = new ArrayList<TYPE>(); returnValue.add( TYPE.NO_OP ); return returnValue; } }
public void setAcls( UIRepositoryObjectAcls security ) throws AccessDeniedException { try { aclService.setAcl( getObjectId(), security.getObjectAcl() ); } catch ( KettleException e ) { throw new AccessDeniedException( e ); } }
public void init() throws ControllerInitializationException { // TODO Initialize the Repository Login Dialog try { messageBox = (XulMessageBox) document.createElement( "messagebox" ); confirmBox = (XulConfirmBox) document.createElement( "confirmbox" ); } catch ( Exception e ) { throw new ControllerInitializationException( e ); } if ( bf != null ) { createBindings(); } }
public IRepositoryExplorerUISupport createUISupport( Class<? extends IRepositoryService> service ) throws UIObjectCreationException { Class<? extends IRepositoryExplorerUISupport> supportClass = uiSupportMap.get( service ); if ( supportClass != null ) { return contruct( supportClass ); } else { return null; } }
/** * Fires a context change event to all listeners. * */ public List<TYPE> fireContextChange() { List<TYPE> returnValue = new ArrayList<TYPE>(); for ( ContextChangeVetoer listener : this ) { returnValue.add( listener.onContextChange() ); } return returnValue; } }
public void addContextChangeVetoer( ContextChangeVetoer listener ) { if ( contextChangeVetoers == null ) { contextChangeVetoers = new ContextChangeVetoerCollection(); } contextChangeVetoers.add( listener ); }
private boolean contains( TYPE type, List<TYPE> typeList ) { for ( TYPE t : typeList ) { if ( t.equals( type ) ) { return true; } } return false; }
public void removeContextChangeVetoer( ContextChangeVetoer listener ) { if ( contextChangeVetoers != null ) { contextChangeVetoers.remove( listener ); } }
/** * Fire all current {@link ContextChangeVetoer}. Every one who has added their self as a vetoer has a change to vote * on what should happen. */ List<TYPE> pollContextChangeVetoResults() { if ( contextChangeVetoers != null ) { return contextChangeVetoers.fireContextChange(); } else { List<TYPE> returnValue = new ArrayList<TYPE>(); returnValue.add( TYPE.NO_OP ); return returnValue; } }
public void setAcls( UIRepositoryObjectAcls security ) throws AccessDeniedException { try { aclService.setAcl( getObjectId(), security.getObjectAcl() ); } catch ( KettleException e ) { throw new AccessDeniedException( e ); } }
public void setAcls( UIRepositoryObjectAcls security ) throws AccessDeniedException { try { aclService.setAcl( getObjectId(), security.getObjectAcl() ); } catch ( KettleException e ) { throw new AccessDeniedException( e ); } }
public void getAcls( UIRepositoryObjectAcls acls, boolean forceParentInheriting ) throws AccessDeniedException { try { acls.setObjectAcl( aclService.getAcl( getObjectId(), forceParentInheriting ) ); } catch ( KettleException ke ) { throw new AccessDeniedException( ke ); } }
public void getAcls( UIRepositoryObjectAcls acls, boolean forceParentInheriting ) throws AccessDeniedException { if ( acl == null ) { try { acl = aclService.getAcl( getObjectId(), forceParentInheriting ); } catch ( KettleException ke ) { throw new AccessDeniedException( ke ); } } acls.setObjectAcl( acl ); }