CCM NG: Shortcut: added first approach of ShortcutManager.java

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@3660 8810af33-2d31-482b-a856-94f89814c4df
pull/2/head
konermann 2015-10-01 09:42:43 +00:00
parent ba743982a8
commit ed43c999d9
1 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,72 @@
/*
* Copyright (C) 2015 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package org.libreccm.shortcuts;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
/**
* This class provides complex operations on {@link Shortcut} objects like
* creating a Shortcut. To use this class add an injection point to your class.
*
* @author <a href="mailto:konerman@tzi.de">Alexander Konermann</a>
*/
@RequestScoped
public class ShortcutManager {
/**
* {@link ShortcutRepository} for interacting with the database. The method
*/
@Inject
private transient ShortcutRepository shortcutRepository;
/**
* Creates a Shortcut
*
*/
private void createShortcut(){
}
/**
* Deletes a Shortcut
*
*/
private void deleteShortcut(Shortcut shortcut){
}
/**
* checks if the Shortcut exists.
*
* @return true if the Shortcut exists
*/
private boolean testShortcut(Shortcut shortcut){
return true;
}
/**
* checks if the given URL is valid
*
*/
private boolean testURL(String url){
return true;
}
}