diff --git a/ccm-shortcuts/src/main/java/org/libreccm/shortcuts/ShortcutManager.java b/ccm-shortcuts/src/main/java/org/libreccm/shortcuts/ShortcutManager.java new file mode 100644 index 000000000..12104b0e9 --- /dev/null +++ b/ccm-shortcuts/src/main/java/org/libreccm/shortcuts/ShortcutManager.java @@ -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 Alexander Konermann + */ +@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; + } +}